BookmarkSubscribeRSS Feed
KevinViel
Pyrite | Level 9

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

 

4 REPLIES 4
Tom
Super User Tom
Super User

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.

KevinViel
Pyrite | Level 9

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.

 

yabwon
Onyx | Level 15

As @SASKiwi adked: is the MAUTOSOURCE turned on?

 

and is the MRECALL turned on too?

 

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



SASKiwi
PROC Star

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 618 views
  • 0 likes
  • 4 in conversation