The data comes from the SASHELP.CLASS system table.
1 Code Block
DATA STEP
Explanation : Defines a `myvar` variable containing the string of SAS code to be executed, then calls `CALL EXECUTE` to stack this code in the execution stream.
Copied!
data _null_;
myvar='proc print data=sashelp.class; run;';
call execute(myvar);
run;
1
DATA _null_;
2
myvar='proc print data=sashelp.class; run;';
3
call execute(myvar);
4
RUN;
2 Code Block
DATA STEP
Explanation : Directly calls `CALL EXECUTE` with a literal string containing the SAS code (here, a PRINT procedure).
Copied!
data _null_;
call execute('proc print data=sashelp.class; run;');
run;
1
2
DATA _null_;
3
call execute('
4
proc print
5
data=sashelp.class;
6
7
run;
8
');
9
RUN;
10
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.