My config file points to an autoexec.sas file that includes:
options mautolocdisplay
sasautos = ( "G:\SAS Data\02_macros"
, sasautos
)
;
When I run a program in interactive PC SAS, it works as intended. When I run the program in batch, I get the following:
WARNING: Apparent invocation of macro MAC_U_INITIALIZE_ENVIRONMENT not resolved.
The log includes:
SASAUTOS=SASAUTOS Specifies the location of one or more autocall libraries.
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
5
6 options mautolocdisplay
7 mautosource
8 sasautos = ( "G:\SAS Data\02_macros"
9 , sasautos
10 )
11 noquotelenmax
12 nocenter
13 nonumber
14 nodate
15 formdlim = " "
16 ls = max
17 ;
18
19 proc options option = sasautos ;
20 run ;
SAS (r) Proprietary Software Release 9.4 TS1M7
The SAS System
SASAUTOS=("G:\SAS Data\02_macros" , sasautos)
Can anyone elucidate the issue or direct me to any documentation? I note that when I included the OPTIONS statement directly in the program, then the batch submission worked as intended.
Thank you,
Kevin
This doesn't sound right:
My config file points to an autoexec.sas file that includes:
You should be using -autoexec option to point to an autoexec file. Or just let the normal rules for searching for an autoexec file apply.
Is the batch submit using a different config file? Different other options?
The normal search order for find an autoexec file is the current directory, then your home directory and finally some system directory. At least that is the way it has worked for the past 25 years.
Is the batch job running with a different working directory then you get when you start SAS interactively?
Is it running as a different user?
Perhaps it is running on a different machine.
Or a different version and/or installation of SAS.
Tom,
Yes, the cfg file is correct, the code I included is:
-ECHOAUTO
-AUTOEXEC "E:\SASHome\SASFoundation\9.4\autoexec.sas"
Reading the log more carefully, I found:
Macro search path is: "G:\SAS Data\sasmacro"
I am on a test server and that is legacy code that I did not write. I am almost certain to find a second execution of the SASAUTOS option.
As @SASKiwi adked: is the MAUTOSOURCE turned on?
and is the MRECALL turned on too?
Bart
When you run the program in batch where are you doing that? On your PC or somewhere else?
Is the MAUTOSOURCE option set on in batch mode?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.