A general procedure for an algebraic formulation of the eigenvalue problem for hamiltonians which have both a discrete and a continuum spectrum is introduced. The one-dimensional Morse potential is used as an example, but more complex types of spectra can also be handled.