115 data work.Tokens;
116 title=" Whatmore's journey to BAHAMA's cities";
117 word=scan(title,5," ,':");
NOTE: The data set WORK.TOKENS has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
Because of the specified delimiters (specifically the single quote), the fifth word is 'BAHAMA'. At compile time, the predefined length of the variable word is 200. This is the default length for new variables created with the SCAN function. The output for the new word variable is below.
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.