Hello,
I output my log to an external log file and reset to the default SAS log at end of program.
proc printto new log="&logref" print="&lstref";
run;
proc printto;
run;
I am wondering whether I can review the external log file in SAS log window at end of the program. Import external log ?
Thanks
Ivy
How about these ways.
1. Use the X command to open the log file in a different application.
x "notepad &logref";
2. Save the log file with DM statement instead of PROC PRINTTO.
proc printto new print="&lstref";
run;
DM "LOG; FILE ""&logref"" ";/* at end of program */
This does not work in batch mode.
3. Read the log file with the INFILE statement and output it to the log.
filename f "&logref";
data _null_;
infile f;
input;
putlog _infile_;
run;
filename f;
How about these ways.
1. Use the X command to open the log file in a different application.
x "notepad &logref";
2. Save the log file with DM statement instead of PROC PRINTTO.
proc printto new print="&lstref";
run;
DM "LOG; FILE ""&logref"" ";/* at end of program */
This does not work in batch mode.
3. Read the log file with the INFILE statement and output it to the log.
filename f "&logref";
data _null_;
infile f;
input;
putlog _infile_;
run;
filename f;
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.