15 data test;
16 set sasdata.chemists;
17 if jobcode = 'chem3' then description = 'Senior Chemist';
18 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.02 seconds
cpu time 0.01 seconds
The equality condition for a value comparison in SAS is case sensitive. The given condition is jobcode = 'chem3'. Note that "CHEM3" is not equal to "chem3" - 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.