BookmarkSubscribeRSS Feed
Helannivas
Quartz | Level 8

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.

8 REPLIES 8
AndrewHowell
Moderator

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)

 

Kurt_Bremser
Super User

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.

Helannivas
Quartz | Level 8
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...
AndrewHowell
Moderator

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?

SASKiwi
PROC Star

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.

Helannivas
Quartz | Level 8

Hi,

 

Sorry for late response.

 

Macros has been updated in autoexec file of Batch server (not in Workspace or Stored Process server).  I have rectified the issue by included the SAS users/groups in the SASApp --> logical Grid sever and in Grid Options Set Mappings.

 

But one thing I need to understand in 9.4 platform. So whenever I update the autoexec file under Batch server , I wont restart the object spawner.

 

But recently did one change in autoexec file under Stored Process server and it requires restart of Object spawner services and then I can able to access the macros.

 

Whether the same case of Workspace server as well???

Kurt_Bremser
Super User

Workspace servers are started everytime a user requests one. Pooled workspace servers and stored process servers are started once and persist, so you need to restart the spawner to get new instances that read and execute the changed autoexecs.

LinusH
Tourmaline | Level 20
The usermods file under the Batch Server is not used when starting Workspace Server sessions.
Data never sleeps

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 3505 views
  • 16 likes
  • 5 in conversation