Architecting, installing and maintaining your SAS environment

SAS Autoexec usermods file

Reply
Frequent Contributor
Posts: 114

SAS Autoexec usermods file

Hi,

 

I have configured all my macros variables in autoexec_usermods.sas file and when I query the macros by %put &macrovarivale, I cannot able to fetch the data from the file.

 

Throwing me Apparent Symbolic reference error. But the similar type of macros , I have written in other levels and I can able to access that.

 

I feel something is missing in one of the level while reading the data from autoexec_usermods file.

 

Can anyone please help me in that. Thanks in advance.

Moderator
Posts: 316

Re: SAS Autoexec usermods file

Posted in reply to Helannivas

Suggestions (to help us help you):

  • If you can , please post the autoexec_usermods.sas file so we have a better idea of what you mean.
  • Plus the statement which causes the reference error.
  • Can you follow the statement with %put _ALL_; and post the results (although remove/mask anything sensitive)

 

Super User
Posts: 9,867

Re: SAS Autoexec usermods file

Posted in reply to Helannivas

And also supply in which server environment the error happens (workspace vs. stored process), and the complete path to the autoexec_usermods.sas file. It may be you edited the wrong file, or that the server is a persistent one (pooled, stored process) and needs to be restarted.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Frequent Contributor
Posts: 114

Re: SAS Autoexec usermods file

Posted in reply to Helannivas
We have defined the variable and the values in the file like user = sas pwd = xxx....While using the libname statement in jobs, we are using &user and &pwd, so that no need to change the jobs while switching over the environments..

Currently the autoexec_usermods files are available under app/sas/config/Lev1/Batch server.

The error happening in the workspace server...
Moderator
Posts: 316

Re: SAS Autoexec usermods file

Posted in reply to Helannivas

I'd have to strongly recommend against storing user credentials in macros, even (so called) masked passwords.

 

If you are running on a metadata platform, rather than define user & password, instead use "authdomain=MyAuthDomain" and set up the authentication domain in metadata (or have your platform admin do it for you).

 

Doesn't directly resolve your macro issue, but since you brought up credentials, thought it worth mentioning.

 

That aside, can you supply code & logs, even if you mask any sensitive information?  Also, do the macro variables contain any special characters - an individual quote, an individual bracket, a keyword like OR, IN, etc?

Super User
Posts: 3,853

Re: SAS Autoexec usermods file

Posted in reply to Helannivas

Have you considered setting up your libraries in SAS metadata? This avoids any AUTOEXEC maintenance at all and using @AndrewHowell's recommendations you can also keep your usernames and passwords encoded.

Ask a Question
Discussion stats
  • 5 replies
  • 213 views
  • 10 likes
  • 4 in conversation