Architecting, installing and maintaining your SAS environment

Managing user profiles with simultaneous SAS jobs

Reply
Frequent Contributor
Posts: 129

Managing user profiles with simultaneous SAS jobs

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?

Super User
Super User
Posts: 6,500

Managing user profiles with simultaneous SAS jobs

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.

Frequent Contributor
Posts: 129

Managing user profiles with simultaneous SAS jobs

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.

Super User
Super User
Posts: 6,500

Managing user profiles with simultaneous SAS jobs

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.

Ask a Question
Discussion stats
  • 3 replies
  • 634 views
  • 0 likes
  • 2 in conversation