BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
c44rl
Fluorite | Level 6

Hi,

I face a problem in batch mode. I need *.rtf output only, so I define ods outputs before proc report section:

ods results off;

ods rtf file="&path.&name..rtf";

<proc report section>

ods rtf close;

In interactive mode in SAS EG I get only *.rtf file. After that I deploy sas jobs and I run them in SAS Management Console. When I schedule the flow then I get two outputs: *.rtf in requested location and *.lst file in main server area. How I can suppress *.lst file creation?

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Any SAS batch job produces a .LST file by default if there is any LISTING printed output, unless you do something to turn off. This is not something special about SMC or LSF scheduling.

Your example code above is pretty much what I do, I use ODS LISTING CLOSE; to turn off listing output then use ODS HTML, or RTF etc to direct output elsehere and it works fine for me - and I schedule batch jobs via SMC.

One possibility is you might be missing some LIST output say from PROC SQL. I would check to see what is in your LST to confirm where it is coming from. Also try putting the ODS LISTING CLOSE; statement right at the start of your program.

View solution in original post

9 REPLIES 9
jakarman
Barite | Level 11

This is most likely part of the sas OS script used by your batch-server. It is no real service/demon just some scripting.

Check the /lev-/<appserver>/batchserver files for that.     Do not change those as you are easily getting more problems as you would expect.

The current directory is not set logically correct for your processing. The only way to solve that in other way is specifying all physical paths for every file. That includes the list file even if you do not use that. In that case. Works as designed.  

---->-- ja karman --<-----
c44rl
Fluorite | Level 6

I know that is strange, because when I execute my program in SAS EG in interactive mode then lst file is not created. I can of course re-direct also listing output, but I am wonder why the file is created in batch mode via SAS Management Console? I used ods results off - it should block all sources.

SASKiwi
PROC Star

Add ods listing close; statement to your program to suppress .LST files in batch mode.

c44rl
Fluorite | Level 6

I've tried to used ods listing close - doesn't work!

ods results off;

ods listing off;

ods rtf file="&path.&name..rtf";

<proc report section>

ods rtf close;

Is it possibile that SAS MC has settings which produce *.lst file by default?

SASKiwi
PROC Star

Your program uses ODS LISTING OFF - the correct syntax is ODS LISTING CLOSE. I'm mystified as ODS LISTING CLOSE works perfectly for me in batch mode and stops .LST files being produced.

EG has extra "wrapper" code that turns off LISTING output and replaces it with ODS HTML output.

c44rl
Fluorite | Level 6

Sorry, I've made mistake n the privious post - I tried 'ods listing close' of course.

SASKiwi
PROC Star

Any SAS batch job produces a .LST file by default if there is any LISTING printed output, unless you do something to turn off. This is not something special about SMC or LSF scheduling.

Your example code above is pretty much what I do, I use ODS LISTING CLOSE; to turn off listing output then use ODS HTML, or RTF etc to direct output elsehere and it works fine for me - and I schedule batch jobs via SMC.

One possibility is you might be missing some LIST output say from PROC SQL. I would check to see what is in your LST to confirm where it is coming from. Also try putting the ODS LISTING CLOSE; statement right at the start of your program.

c44rl
Fluorite | Level 6

Yep, when I put "ods listing close" at the top of my program then *.lst output has been not created.  So, seems that in the middle of my program some uneccesary ods output is created and by default is printing to *.lst in batch mode.

jakarman
Barite | Level 11

Did you check the scripts files being defined at the batchserver for your appserver.
It is not a strange behavior when it is defined there and I explained the why.

The SMC is just a way of calling that script using definitions found in the sas metadata that are SAS-tables.

Understanding how it works instead of mentioning as visualization you see would be helpful for analyzing. There must be an OS script defined in seen in the SMC that what will be started and having some parameters. When you are using LSF (grid) LSF knows that script and the initiation of that visible by settings seen in the SMC. 

---->-- ja karman --<-----

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 8419 views
  • 3 likes
  • 3 in conversation