Discussion:
Extra log printing in share where batch SAS is run from, Want to turn that off
(too old to reply)
Renee
2004-04-13 17:25:11 UTC
Permalink
Hi,

I am running SAS V8.2 on a UNIX box. We are running from a batch
command line to submit the sas jobs. When running from the
share(folder), the sas program creates a log in that share and also
creates the log file that is created in the program to it's assigned
folder. We want to turn off the 1st log that gets created. I have
tried using -altlog in the CFG file, but when it runs, it says that
the file is not found because it first puts my home directory up there
(as that is where the batch file is run from)

Here is an example of the batch file we run:
*******************************************************************
nohup sas -config "/home/nqdev/shared/sasv8prodnew.cfg" -sysin
"/home/nqdev/source/fin_2115.sas" -autoexec
"/home/nqdev/shared/autoexec.sas" &
*******************************************************************

Here is an example of the sasv8prodnew.cfg file:
***********************************************
/*
* Default options:
*/
/* INI File - Directory Paths */
-path !SASROOT/hotfix/sasexe
-sysparm "'/home/nqdev/shared/prod.ini'"

-sasscript (!SASROOT/misc/connect)

-altlog "'/home/nqdev/log'"

-sasautos ( '!SASROOT/sasautos' )
-sashelp ( '!SASROOT/sascfg' '!SASROOT/sashelp' )
-maps !SASROOT/maps
-msg !SASROOT/sasmsg

-sasuser ~/sasuser.800
-work /sastemp

-dmsexp
-setjmp
-mvarsize 32K
-msymtabmax 4M
-sortsize 48M
-memsize 64M
-maxmemquery 6M
-noasynchio

-helploc ( '!sasuser/classdoc' '!SASROOT/X11/native_help' )
-docloc !SASROOT/install/docloc.htm
-appletloc !SASROOT/misc/applets

/*
* -news specifies the name of a text file that will automatically
* be displayed in the log when SAS is invoked.
*/
-news !SASROOT/misc/base/news

-path !SASROOT/sasexe

*******************************************************************
Any help would be greatly appreciated.

Renee
Evert Carton
2004-04-13 18:14:59 UTC
Permalink
I don't know how you create the second log. Would that be through a proc
printto ?

I just tried to do this (on Linux, SAS v8.2)

sas -log /dev/null ... -sysin ...

In the code I've put a:

proc printto log='/new/location/sas.log'; run;

/* other statements */

That seems to do the trick for me. The initial log is not created yet the
second one contains just what I need.

Regards,
Evert

Or have SAS run as a dedicated user whose home-directory happens to be
where you want your log files to go.
Hi,
I am running SAS V8.2 on a UNIX box. We are running from a batch command
line to submit the sas jobs. When running from the share(folder), the sas
program creates a log in that share and also creates the log file that is
created in the program to it's assigned folder. We want to turn off the
1st log that gets created. I have tried using -altlog in the CFG file,
but when it runs, it says that the file is not found because it first puts
my home directory up there (as that is where the batch file is run from)
******************************************************************* nohup
sas -config "/home/nqdev/shared/sasv8prodnew.cfg" -sysin
"/home/nqdev/source/fin_2115.sas" -autoexec
"/home/nqdev/shared/autoexec.sas" &
*******************************************************************
*********************************************** /*
*/
/* INI File - Directory Paths */
-path !SASROOT/hotfix/sasexe
-sysparm "'/home/nqdev/shared/prod.ini'"
-sasscript (!SASROOT/misc/connect)
-altlog "'/home/nqdev/log'"
-sasautos ( '!SASROOT/sasautos' )
-sashelp ( '!SASROOT/sascfg' '!SASROOT/sashelp' ) -maps !SASROOT/maps
-msg !SASROOT/sasmsg
-sasuser ~/sasuser.800
-work /sastemp
-dmsexp
-setjmp
-mvarsize 32K
-msymtabmax 4M
-sortsize 48M
-memsize 64M
-maxmemquery 6M
-noasynchio
-helploc ( '!sasuser/classdoc' '!SASROOT/X11/native_help' ) -docloc
!SASROOT/install/docloc.htm
-appletloc !SASROOT/misc/applets
/*
* -news specifies the name of a text file that will automatically *
be displayed in the log when SAS is invoked. */
-news !SASROOT/misc/base/news
-path !SASROOT/sasexe
******************************************************************* Any
help would be greatly appreciated.
Renee
Glenn Heagerty
2004-04-13 19:37:28 UTC
Permalink
Hi Renee,

You can use the -log system option rather than -altlog in the config file:

-log /home/nqdev/log

This will route the SAS log for batch jobs using your sample config file to the
specified directory. It sounds like all users store logs in the same location,
use the same configuration file, and only want one copy of the log so this
should be OK.

Your current setup uses double and single quotes around the path. Maybe this is
necessary for your site. I only use them if the path contains special characters.

If a user wants to use a different location or get another copy, then use -log
or -altlog along with the sas command.

Hope this helps,

Glenn
Post by Renee
Hi,
I am running SAS V8.2 on a UNIX box. We are running from a batch
command line to submit the sas jobs. When running from the
share(folder), the sas program creates a log in that share and also
creates the log file that is created in the program to it's assigned
folder. We want to turn off the 1st log that gets created. I have
tried using -altlog in the CFG file, but when it runs, it says that
the file is not found because it first puts my home directory up there
(as that is where the batch file is run from)
*******************************************************************
nohup sas -config "/home/nqdev/shared/sasv8prodnew.cfg" -sysin
"/home/nqdev/source/fin_2115.sas" -autoexec
"/home/nqdev/shared/autoexec.sas" &
*******************************************************************
***********************************************
/*
*/
/* INI File - Directory Paths */
-path !SASROOT/hotfix/sasexe
-sysparm "'/home/nqdev/shared/prod.ini'"
-sasscript (!SASROOT/misc/connect)
-altlog "'/home/nqdev/log'"
-sasautos ( '!SASROOT/sasautos' )
-sashelp ( '!SASROOT/sascfg' '!SASROOT/sashelp' )
-maps !SASROOT/maps
-msg !SASROOT/sasmsg
-sasuser ~/sasuser.800
-work /sastemp
-dmsexp
-setjmp
-mvarsize 32K
-msymtabmax 4M
-sortsize 48M
-memsize 64M
-maxmemquery 6M
-noasynchio
-helploc ( '!sasuser/classdoc' '!SASROOT/X11/native_help' )
-docloc !SASROOT/install/docloc.htm
-appletloc !SASROOT/misc/applets
/*
* -news specifies the name of a text file that will automatically
* be displayed in the log when SAS is invoked.
*/
-news !SASROOT/misc/base/news
-path !SASROOT/sasexe
*******************************************************************
Any help would be greatly appreciated.
Renee
Loading...