BookmarkSubscribeRSS Feed
BruceBrad
Lapis Lazuli | Level 10

I'm running SAS in both batch and interactive modes at the same time on the same machine (9.2 on Windows server 2008r8 64).

I would like to be able to submit a batch job and then open an interactive job. However, if I do this, I get a message saying that the interactive session cannot access the sasuser profile. This is a problem, because I want to use and make changes to the default settings from the interactive job. Using the -rsasuser on the batch job doesn't make any difference.

Presumably one approach would be to copy the sasuser profile somewhere else, then run the batch job accessing just this profile. Is there a way to do this?

3 REPLIES 3
Tom
Super User Tom
Super User

You can prevent this by controlling your access to the SASUSER library.

What I usually do is add the -RSASUSER option to my configuration file.  This will make SAS open the SASUSER library in readonly mode and so it will not lock out the second (or third or fourth) session from accessing the PROFILE catalog.  You can add this to either the configuration file or to the command line that you use to start SAS.  The only trouble I have had is the occasional SAS tool that doesn't seem to understand that he RSASUSER option exists and is hard coded to write files to the SASUSER library.

When you actually do want to modify something in your PROFILE then use the -NORSASUSER option.

Another way is to create multiple directories with copies of your sasuser directory and use the -SASUSER option to point to different ones for different jobs.  This has the disadvantage of requiring you to synchronize them.

BruceBrad
Lapis Lazuli | Level 10

That's what I was trying to do (using -rsasuser on the command line of the first session). However, I still get the error when I start the second session. My program is only using Base SAS features.

NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.

Tom
Super User Tom
Super User

All of the sessions need use -RSASUSER.  The first one has the PROFILE open so the second one cannot open it to write.  With the -RSASUSER option SAS will not attempt to open it to write and it will work.

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
  • 3 replies
  • 2399 views
  • 0 likes
  • 2 in conversation