I follow the steps provided in the following website http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001349233.htm. proc sort data=Gta2 Out=Gta3; by Agmtcd; run; data sub_Gta3; set Gta3; by Agmtcd; run; data sub_Gta3; set Gta3; FirstAgmtcd=first.Agmtcd; LastAgmtcd=last.Agmtcd; run; However, SAS says the variables "first.Agmtcd" and "last.Agmtcd" are not initialized. The format of Agmtcd is $10. Does anybody know what's wrong with my code? Thanks a lot!
... View more