Usage Note 64515: How to prevent the "ERROR: Library APSWORK does not exist" error message when you are running the SAS® Stored Process Server
When you are running the SAS Stored Process Server, if the APSWORK library directory is missing from the file system, the following error message occurs in the stored process log file when a stored process attempts to use the APSWORK library:
ERROR: Library APSWORK does not exist.
Here are some tips for preventing this problem.
- Insert the following code at the top of your stored process code:
options dlcreatedir;
libname apswork "%sysfunc(pathname(apswork))";
options nodlcreatedir;
This code re-creates the APSWORK directory on the file system if it does not exist.
- Do not configure the SAS Stored Process Server to locate its WORK library in a directory that will be cleaned up by a cleanup utility. A cleanup utility can sometimes delete the APSWORK directory. This scenario is the most common reason for why the directory is deleted. The APSWORK directory for the SAS Stored Process Server is located under the WORK directory.
Therefore, do not locate the WORK library under /tmp in a Linux or UNIX environment. Also, do not locate the WORK library under C:\temp in a Microsoft Windows environment.
- To discover the location of the APSWORK library and the WORK library, add the following code to an existing stored process:
libname APSWORK list;
libname WORK list;
Then view the stored process log file.
- To change the location of the WORK library for the SAS Stored Process Server, follow these steps:
- Modify the sasv9_usermods.cfg file. This file is usually located in a path that is similar to this:
SAS-configuration-directory/Lev1/SASApp/StoredProcessServer/sasv9_usermods.cfg
- Add the following line, where you specify the location of the new WORK library:
-work "/your_work_directory_path_here"
- Restart the object spawner to activate the change.
- The following stored process code can help determine whether this problem exists (because the GCHART procedure uses the APSWORK library):
%stpbegin;
proc gchart data=sashelp.class;
vbar age;
run;
%stpend;
Operating System and Release Information
| SAS System | SAS Integration Technologies | Windows 7 Professional x64 | 9.4 TS1M0 | |
| 64-bit Enabled AIX | 9.4 TS1M0 | |
| 64-bit Enabled Solaris | 9.4 TS1M0 | |
| HP-UX IPF | 9.4 TS1M0 | |
| Linux for x64 | 9.4 TS1M0 | |
| Solaris for x64 | 9.4 TS1M0 | |
| Windows 7 Enterprise x64 | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | |
| Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Pro x64 | 9.4 TS1M0 | |
| Microsoft Windows 10 | 9.4 TS1M0 | |
| Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 Std | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | |
| Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | |
| Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | |
| Microsoft® Windows® for x64 | 9.4 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
If the APSWORK library directory is deleted from the file system, the following error message occurs in the stored process log file when a stored process attempts to use the APSWORK library: "ERROR: Library APSWORK does not exist."
| Date Modified: | 2019-07-30 16:04:23 |
| Date Created: | 2019-07-25 17:10:29 |