In PROC QLIM, if you specify a sample selection model where the selection only leads to one equation, and only one value is taken by the selection variable when the equation is selected, and at least one independent variable is missing in the data set for every observation when the selection variable is not being selected, then the following error message will appear in the log:
ERROR: Discrete endogenous variable yyy does not have at least two levels.
This error message is produced because if any independent variable is missing for an observation, PROC QLIM will delete that observation.
To circumvent the problem, specify arbitrary value for the missing independent variable when the selection variable is not being selected. This will prevent the observation from being deleted and will not affect estimation results.