- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I start all my code by clearing the results fine using "dm 'odsresults; clear';" as specified on this page. I was wondering is there a way to save the results as a lst file (instead of clicking on output, file=>Save AS) via syntax?
I am able to do it for automatically save the log file automatically by using the "DM LOG" command and specifying a file location/name at the end of my code. I can't seem figure out a way to do it for results/LST file, so wondering if anyone can show me how.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is something like this what you are looking for? Place this at the beginning of your program, or at any point within the program where you want the .LST file to begin.
ods listing file="\\server\folder\example1.lst";
and as the last line of code, or anywhere where you want the creation of the .LST file to stop
ods listing close;
Or you can use PROC PRINTTO
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is something like this what you are looking for? Place this at the beginning of your program, or at any point within the program where you want the .LST file to begin.
ods listing file="\\server\folder\example1.lst";
and as the last line of code, or anywhere where you want the creation of the .LST file to stop
ods listing close;
Or you can use PROC PRINTTO
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you asking for the DM command to save the LOG to a file? You could use the FILE command. But it general for the LOG and OUTPUT windows it is better to use the PRINT command since then the formfeeds are inserted between the pages.
dm 'log; print file="myprogram.log"; ';