Hello,
May I ask what file I need to modify to add LOGPARM= option?
Thanks
Logparm is going to need to be configured in the config file or command line option.
If you are looking for a way to create output of the log you may want to investigate Proc Printto. With the LOG= option to direct the log output to a text file it is pretty flexible and can be turned off and on for specific procedures or data steps.
A rough example:
proc printto log='d:\log.txt' new; run; proc freq data=sashelp.class; tables sex; run; proc means data=sashelp.class; var height weight; run; proc printto; /* without options ends proc printto output*/ run;
the path to the text file should of course be valid on your system.
The options of printto actually let you append to an existing file so you could be creating separate streams of log output, such as one for data steps, one for analyis procedures and yet another for report procedures.
Thank you very much!
May I ask how to do it in config file or command line option?
Thanks!
First you need to know what you want to accomplish with the values you set.
If you want to make the same settings for every session then edid the config file.
Then find the config file you are using. Copy and make a backup of the current working version just in case.
It will be a text file with a name like SASV9.CFG
You would add a some code that looks like
-LOGPARM= "<OPEN= APPEND | REPLACE | REPLACEOLD> <ROLLOVER= AUTO | NONE | SESSION | n | nK | nM | nG> <WRITE= BUFFERED | IMMEDIATE>"
with one or more of the options set for Open Rollover Write. Without knowing exactly what you are attempting to do it is hard to make suggestions and I refer you to online help.
If you want to change for different sessions then in what every program or tool starts SAS you would add -logparm " <options go here>" note that you may want to work with the -LOG as well as there are directives that affect the name of the log file(s) created.
I just added this line to my config file and it worked to answer my own problem.
-LOGPARM "WRITE=IMMEDIATE"
The syntax of how to convert a command line parameter to a config file entry was something I was wondering about. This article helped me. @ballardw put an equal sign, I didn't use one. It might be optional. The angle brackets I figure were used to indicate the three sub-options are optional and not required in the quotes. Thanks
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.