Lesson 2, Part 2: Understanding Compilation and Execution in SAS ¶
In [9]:
ods html close;
options nodate nonumber nonotes;
DATA work.HAVE;
PUT 'After Compilation, Before Execution:' _ALL_;
INPUT Name $ quiz1 quiz2 quiz3;
Ave_Score = ROUND(MEAN(OF quiz1-quiz3),.01);
put 'At End of Execution:' _ALL_;
DATALINES;
Amy 78 84 82
Neil 90 85 86
John 82 79 89
Keya 78 86 78
;
run;
The SAS System
436 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode='inline') device=svg style=HTMLBlue;
436 ! ods graphics on / outputfmt=png;
437
438 ods html close;
439 options nodate nonumber nonotes;
440 DATA work.HAVE;
441 PUT 'After Compilation, Before Execution:' _ALL_;
442 INPUT Name $ quiz1 quiz2 quiz3;
443 Ave_Score = ROUND(MEAN(OF quiz1-quiz3),.01);
444 put 'At End of Execution:' _ALL_;
445 DATALINES;
After Compilation, Before Execution:Name= quiz1=. quiz2=. quiz3=. Ave_Score=. _ERROR_=0 _N_=1
At End of Execution:Name=Amy quiz1=78 quiz2=84 quiz3=82 Ave_Score=81.33 _ERROR_=0 _N_=1
After Compilation, Before Execution:Name= quiz1=. quiz2=. quiz3=. Ave_Score=. _ERROR_=0 _N_=2
At End of Execution:Name=Neil quiz1=90 quiz2=85 quiz3=86 Ave_Score=87 _ERROR_=0 _N_=2
After Compilation, Before Execution:Name= quiz1=. quiz2=. quiz3=. Ave_Score=. _ERROR_=0 _N_=3
At End of Execution:Name=John quiz1=82 quiz2=79 quiz3=89 Ave_Score=83.33 _ERROR_=0 _N_=3
After Compilation, Before Execution:Name= quiz1=. quiz2=. quiz3=. Ave_Score=. _ERROR_=0 _N_=4
At End of Execution:Name=Keya quiz1=78 quiz2=86 quiz3=78 Ave_Score=80.67 _ERROR_=0 _N_=4
After Compilation, Before Execution:Name= quiz1=. quiz2=. quiz3=. Ave_Score=. _ERROR_=0 _N_=5
450 ;
451 run;
452
453
454
455 ods html5 (id=saspy_internal) close;ods listing;
456
The SAS System
457
In [ ]: