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.
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
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=.
Can't you just remove the FMTLIB option. That is the option that is producing printed output.
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;
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=.
indeed, just deleting the FMTLIB solved the problem, how could I not see that!!!
thanks a lot to all for your feedback.
Regards,
Karl
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.