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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.