25 data test;
26 set sasdata.chemists;
27 if jobcode = 'Chem2' then description = 'Senior Chemist';
28 else description = 'Unknown';
NOTE: There were 2 observations read from the data set SASDATA.CHEMISTS.
NOTE: The data set WORK.TEST has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
The equality condition for a value comparison in SAS is case sensitive. The given condition is jobcode = 'Chem2'. Note that "Chem2" is not equal to "chem2" - thus, the condition is false and the description value is set to "Unknown."
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.