hello
I am running a SAS program through batch mode
I am using below batch file
"\\server1\Program Files\SASHome\SASFoundation\9.4\sas.exe" -config "\\server1\SASConfig\Config\Lev1\BANKDATA\sasv9.cfg" -metaautoresources "BANKDATA" -sysin "\\server1\CODE\new.sas" -log "\\server1\LOG\DG20AUG2018\new.txt"
SAS program new conatin following code
data new; set sashelp.class; run
when I am running this BAT file program is running file
Log file looks this
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.NEW has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
But I want log file should look like this
15 data new;
16 set sashelp.class;
17 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.NEW has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
I want log file should include data and proc step so that I can know what code has run
How can i acheive that
Per default, SAS will include all code from the main program in the log. It looks like some part of your configuration (config, autoexec) sets options nosource.
Code included with %include will only appear in the log if you set options source2.
Sounds like you have turned off an option as the second example is default behaviour. Maybe:
options source;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.