I was unable to get the example code provided to complete successfully. If you need to conditionally assign each new variable you create then you could try creating a separate data set that holds your logic, e.g.: data logic;
infile datalines truncover;
input logic $char200.;
datalines;
if graduate = "Y" then school = "college"
; Then any number of logic lines could be used for any number of new variables. Regards, Amir.
... View more