Supress creating *.lst output in batch mode via SAS Management Console

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Supress creating *.lst output in batch mode via SAS Management Console

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?


Accepted Solutions
Solution
‎09-30-2014 09:13 PM
Respected Advisor
Posts: 3,069

Re: Supress creating *.lst output in batch mode via SAS Management Console

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


All Replies
Valued Guide
Posts: 3,207

Re: Supress creating *.lst output in batch mode via SAS Management Console

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 --<-----
Occasional Contributor
Posts: 9

Re: Supress creating *.lst output in batch mode via SAS Management Console

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.

Respected Advisor
Posts: 3,069

Re: Supress creating *.lst output in batch mode via SAS Management Console

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

Occasional Contributor
Posts: 9

Re: Supress creating *.lst output in batch mode via SAS Management Console

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?

Respected Advisor
Posts: 3,069

Re: Supress creating *.lst output in batch mode via SAS Management Console

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.

Occasional Contributor
Posts: 9

Re: Supress creating *.lst output in batch mode via SAS Management Console

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

Solution
‎09-30-2014 09:13 PM
Respected Advisor
Posts: 3,069

Re: Supress creating *.lst output in batch mode via SAS Management Console

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.

Occasional Contributor
Posts: 9

Re: Supress creating *.lst output in batch mode via SAS Management Console

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.

Valued Guide
Posts: 3,207

Re: Supress creating *.lst output in batch mode via SAS Management Console

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 --<-----
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 1946 views
  • 0 likes
  • 3 in conversation