162 data work.sales;
163 do year = 1 to 5;
164 do month = 1 to 12;
165 x + 1;
NOTE: The data set WORK.SALES has 1 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
Only one observation will be present in the output.
STEP 1 : The first loop, do year = 1 to 5; will stop execution after a value of 6 is set to the year variable.
STEP 2 : The second (inner) loop, do month = 1 to 12; stops execution after a value of 13 is set to the month variable.
STEP 3 : The X value is incremented 60 times since it is executed in the inner loop. The variable x is set to a value of 60.
SAS write the values of these variable when the RUN; statement occurs.
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.