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
- Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser; run; |
- View the new information that is written to the log and make a note of the directory to which SASUSER points.
- Stop all running SAS sessions.
- From your operating system, open your SASUSER directory and rename templat.sas7bitm to templat.old.
- 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:
- Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser; run; |
- Stop any running SAS sessions.
- 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:
- Determine the location of your SASUSER directory by submitting the following code to SAS:
proc options option=sasuser; run; |
- Stop any running SAS sessions.
- From your operating environment, open your SASUSER directory and rename regstry.sas7bitm to regstry.old.
- 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; |
- View the new information that is written to the log and make a note of the directory to which SASUSER points.
- Stop all running SAS sessions.
- 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
- 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.
1 Comment
Thank you, Martin!
These information is very useful and helpful. I have another issue below, could you please help?
When below code is run in Linux, a warning below is shown in Log. I thought to delete the file templat.sas7bitm to avoid this warning to appear in log. But the warning appears first, then the templat.sas7bitm is deleted. So I think to suppress this warning. I googled and do not find a way to suppress this warning. Do you have a thought about suppressing this warning?
%if %bquote(%upcase(&sysscpl)) = LINUX %then %do;
proc datasets library=sasuser nolist;
delete templat(memtype=itemstor);
run;
%end;
WARNING: SASUSER.TEMPLAT is not a template store! It will be ignored.