Errors might be generated when attempting to store templates in the SASUSER location


Errors are generated when attempting to store templates in the SASUSER library when the library is in use by another SAS session or another process. An error like the following is common:

ERROR: Template 'xxxxx' was unable to write to the template store!

By default, templates are stored in the SASUSER.TEMPLAT item store unless the ODS PATH is modified. Errors might also occur when writing to the SASUSER location if the access mode for the template store has been changed to (read). In addition, the following errors are generated if the RSASUSER option is set:

ERROR: A lock is not available for the SASUSER.TEMPLATE.ITEMSTOR,
       Lock held by another process.
ERROR: Template "xxxxx" was unable to write to the template store.

You can verify the ODS PATH settings using the code below:

ods path show;

To eliminate the error messages, use the ODS PATH statement to write to an alternate location. The example below adds a temporary item store in the Work directory where the templates will be written. In this example, the WORK.TEMPLAT item store is added before the default path.

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