Debugging SASUSER issues when you use SAS® software

0

When you use SAS software, you might occasionally encounter an issue with SASUSER. This post helps you debug some of the more common issues:

  • a warning message indicates that SASUSER.TEMPLAT is not an item store or that you cannot write to SASUSER.TEMPLAT
  • a note in the log indicates that SAS cannot open the SASUSER.PROFILE catalog
  • a note in the log indicates that SAS cannot open the SASUSER.REGSTRY item store
  • various errors and abnormal endings occur when you use the SAS® Output Delivery System or create graphics output
  • access to SASUSER is read-only

Issue 1: SAS® writes a message to the log indicating that SASUSER.TEMPLAT is not an item store or that you cannot write to SASUSER.TEMPLAT

By default, SAS tries to store custom templates and styles that PROC TEMPLATE creates in SASUSER. In some SAS environments with multiple users on a server, your SASUSER location might be read-only (set with the RSASUSER option). If you do not need the template or style to persist between sessions, you can set the template path to include the WORK library first:

ods path(prepend) work.template(update);

If you are working with a local SAS session, this issue can occur when a corrupt or old copy of the templat.sas7bitm file exists in your SASUSER directory. To resolve the issue

  1. Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser;
run;
  1. View the new information that is written to the log and make a note of the directory to which SASUSER points.
  2. Stop all running SAS sessions.
  3. From your operating system, open your SASUSER directory and rename templat.sas7bitm to templat.old.
  4. Restart SAS.

Issue 2: SAS® writes a note or warning to the log indicating that SAS cannot open SASUSER.PROFILE

If you see a note or warning in the log indicating that SAS cannot open the SASUSER.PROFILE catalog, you should ensure first that you have only a single SAS session running.  If you have multiple SAS sessions running concurrently only the first SAS session has Update access to SASUSER.

If only one SAS session is active and you still receive a note or warning that SAS cannot open SASUSER.PROFILE:

  1. Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser;
run;
  1. Stop any running SAS sessions.
  2. Rename the following files in your SASUSER directory:

In Microsoft Windows operating environments, rename the files as follows:

  • profile.sas7bcat to profile.old
  • profbak.sas7bcat to profbak.old
  • profile2.sas7bcat to profile2.old

In UNIX operating environments, rename the files as follows:

  • profile.sas7bcat to profile.old
  • profbak.sas7bcat to profbak.old

Issue 3: SAS® writes a note or warning to the log indicating that SAS cannot open the SASUSER.REGSTRY item store

If you see a note or warning in the log indicating that SAS cannot open SASUSER.REGSTRY, ensure first that you have only a single SAS session running. If you have multiple SAS sessions running concurrently only the first SAS session has Update access to SASUSER.

If only one SAS session is active and you still receive a note or warning that SAS cannot open SASUSER.REGSTRY:

  1. Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser;
run;
  1. Stop any running SAS sessions.
  2. From your operating environment, open your SASUSER directory and rename regstry.sas7bitm to regstry.old.
  3. Restart SAS.

Issue 4: Various abnormal endings and errors occur when you use SAS Output Delivery System (ODS) or when you create graphics output

If one or more files or catalogs in SASUSER are corrupted, various abnormal endings and errors can occur when you use ODS or when you create graphics output.

If you suspect that this is the case, determine the location of your SASUSER directory by submitting the following code to SAS:

proc options option=sasuser;
run;
  1. View the new information that is written to the log and make a note of the directory to which SASUSER points.
  2. Stop all running SAS sessions.
  3. From your operating environment, open the SASUSER directory and rename the following files (if they exist) as shown:
  • profile2.sas7bcat to profile2.old
  • regstry.sas7bitm to regstry.old
  • templat.sas7bitm to templat.old
  1. Restart SAS.

Issue 5: Access to the SASUSER directory is Read-Only

If you follow the debugging steps for any of the issues outlined above and find that you still have Read access to SASUSER, the problem might be with your SAS installation. Specifically, your installation might have the RSASUSER SAS system option set. This system option sets SASUSER to Read-Only mode.  To determine the current setting for this option, submit the following statements to SAS and then check the new information that is written to the SAS log:

proc options option=rsasuser;
run;

In a multiuser SAS environment or SAS Grid Computing environment, RSASUSER might be set by policy. In that case, you must adjust your programs/process to not rely on SASUSER for personal content. If working with a local or private SAS environment, you can change the option to NORSASUSER in your SAS configuration file.

Summary

As you can see from this post, a variety of reasons can cause issues with the SASUSER directory. These issues can occur when one or more catalogs or item stores in your SASUSER directory become corrupted or are created with an earlier installation of SAS. However, if you rename the catalogs or item stores with a file extension that SAS does not recognize, SAS creates new, uncorrupted copies of these files when you restart SAS.

Share

About Author

Martin Mincey

Senior Technical Support Analyst, SAS Technical Support

Martin Mincey is a Senior Principal Technical Support Analyst in the Foundation SAS group in Technical Support. He has been in SAS Technical Support since 1984. His main areas of expertise are SAS/GRAPH, ODS, and ODS Graphics.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top