/***************************************************************************************************************** SAS file name: File location: _________________________________________________________________________________________________________________ Purpose: Author: Peter Clemmensen Creation Date: 18/11/2017 This program supports the example page "Dynamic Programming in SAS with CALL EXECUTE" on SASnrd.com *****************************************************************************************************************/ /* Simple Call Execute Example */ data _null_; call execute("data class;"); call execute("set sashelp.class;"); call execute("run;"); run; /* Create code for each observation in ds */ data ds; input name $; datalines; one two three ; data _null_; set ds; call execute (compbl(cat( "data ", name, "; set sashelp.class; run;" ))); run; /* Equivalent to */ data one; set sashelp.class; run; data two; set sashelp.class; run; data three; set sashelp.class; run;