NOPRINT option not working -or how to suppress creation of an .lst in batch mode

Reply
Occasional Contributor
Posts: 8

NOPRINT option not working -or how to suppress creation of an .lst in batch mode

Dear all,

I have the following issue:

I need to create a format catalog from a SAS dataset. I use the following (usual) code

PROC FORMAT CNTLIN=WORK.SOURCE_FORMATS LIBRARY=TARGET.FORMATS FMTLIB NOPRINT;

RUN;

And it does work, no problem there. However this PROC procedure also opens the output and result windows, aside of writing in the log of course, which in itself is no issue.

rogeragain.jpg - Google Drive

The problem comes when this program is run in batch mode, then this procedure causes SAS to create an .lst output file and we don't want that.

As you can see above, the PROC FORMAT procedure has the NOPRINT option, however, SAS seems to ignore this during batch mode, it keeps creating the .lst output file.

Any ideas on how to stop SAS of doing that?. The program above is quite simple, just takes a SAS dataset, creates the catalog, and that's the end of the program, there are no ODS calls in case you're thinking maybe is an ODS issue.

I run this in batch mode under SAS 9.3 (also tried under 9.2, same thing). Many thanks for your suggestions.

Regards,

Karl

Respected Advisor
Posts: 3,788

Re: NOPRINT option not working -or how to suppress creation of an .lst in batch mode

Can't you just remove the FMTLIB option.  That is the option that is producing printed output.

Trusted Advisor
Posts: 1,795

Re: NOPRINT option not working -or how to suppress creation of an .lst in batch mode

The problem comes when this program is run in batch mode, then this procedure causes SAS to create an .lst output file and we don't want that.

As you can see above, the PROC FORMAT procedure has the NOPRINT option, however, SAS seems to ignore this during batch mode, it keeps creating the .lst output file.

Any ideas on how to stop SAS of doing that?.

ODS LISTING CLOSE;

Super User
Posts: 7,447

Re: NOPRINT option not working -or how to suppress creation of an .lst in batch mode

As data_null_ suggested, omit the FMTLIB option, and you won't need NOPRINT (which is not mentioned in the PROC FORMAT documentation) at all. Use only CNTLIN= and LIBRARY=.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 8

Re: NOPRINT option not working -or how to suppress creation of an .lst in batch mode

indeed, just deleting the FMTLIB solved the problem, how could I not see that!!!

thanks a lot to all for your feedback.

Regards,

Karl

Ask a Question
Discussion stats
  • 4 replies
  • 1557 views
  • 1 like
  • 4 in conversation