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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.