BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Satish_Parida
Lapis Lazuli | Level 10

Hi Experts,

 

We are using the following to call my SAS Program.

 

SET F=\\PROG\V04
call sasgsublog_EDC "%F%\BB_Quicklist_Report.sas"

I know we can control the Log and the Listing path using Proc Printto.

Can we use -PRINT or any other option in call command in the cmd batch file to control the LOG and LST file location. I tried using -PRINT, it did not work.

 

Kindly suggest.

1 ACCEPTED SOLUTION

Accepted Solutions
AnandVyas
Ammonite | Level 13

You don't have to make any changes to your configuration. I don't have a GRID environment at the moment but I can show you what I did to batch submit for a workspace session job.

cp /sasconfig/Lev1/SASApp/WorkspaceServer/logconfig.trace.xml ~

cd ~

vi logconfig.trace.xml and change the log location to home directory as below:

Anand_V_0-1591365385653.png

submit the job and pass the edited log-config location a log is generated at home directory.

Anand_V_1-1591365528619.png

so this is like a personal configuration file for your jobs that you can modify.

 

Hope this helps!

 

 

View solution in original post

5 REPLIES 5
AnandVyas
Ammonite | Level 13
Are you talking about the log of the program? Then you can pass the -LOGCONFIGLOC logging-option-file with custom changes related to your job.

https://go.documentation.sas.com/?docsetId=gridref&docsetTarget=p05eo0im8mix5qn1bz77trdvzd2s.htm&doc...
Satish_Parida
Lapis Lazuli | Level 10

Thank you for your response.

 

We get a log file in the control location (most of the time where the .SAS file is placed) when a SAS program is run using windows batch or shell batch. 

 

Can we have any options to print log and the listings in a user specified location without changing anything on SAS code or the SAS application configuration.

yabwon
Amethyst | Level 16
Hi,
Adding a `proc printto` in autoexec.sas is not an optin I guess?
Bart
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



AnandVyas
Ammonite | Level 13

You don't have to make any changes to your configuration. I don't have a GRID environment at the moment but I can show you what I did to batch submit for a workspace session job.

cp /sasconfig/Lev1/SASApp/WorkspaceServer/logconfig.trace.xml ~

cd ~

vi logconfig.trace.xml and change the log location to home directory as below:

Anand_V_0-1591365385653.png

submit the job and pass the edited log-config location a log is generated at home directory.

Anand_V_1-1591365528619.png

so this is like a personal configuration file for your jobs that you can modify.

 

Hope this helps!

 

 

Satish_Parida
Lapis Lazuli | Level 10
Can you add a full config file, for reference of the other users. Thank you very much.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 5 replies
  • 3510 views
  • 1 like
  • 3 in conversation