You need to login to view this content. Please
Login. Not a Member?
Join Us
Log:
15 data test;
16 set sasdata.chemists;
17 if jobcode = 'chem3' then description = 'Senior Chemist';
18 else description = 'Unknown';
19 run;
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
Data Set(s):

Commentary:
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."
Leave a Comment