C to establish the phonon frequencies for all Raman-and ͑IR-͒ infrared-active optical qϭ0 modes using the generalized-gradient-corrected full-potential linear augmented plane-wave method. From a series of atomic force calculations the shape of the phonon potential is established. Our calculated Raman-active phonon frequencies are found to be in very good agreement with the available Raman-scattering measurements. In the case of IR-active phonons, to our best knowledge, there are no experimental frequencies available and our theoretical study is the first report for these series. The Raman-scattering intensities for all Raman-active modes of YNi 2 B 2 C are determined allowing a detailed comparison between theoretical and experimental Raman spectra. The changes in the electronic structure introduced by the phonon modes are also analyzed. Although the calculated electronic structure of these materials has three-dimensional character we found a large anisotropy in the optical dielectric function due to the layered nature of the crystal structure.