SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 34961: Reassigning a pre-assigned LIBREF in a stored process might cause an Access Violation

DetailsHotfixAboutRate It

An Access Violation might occur if a stored process reassigns an existing pre–assigned LIBREF using a different engine. For example, if a library called MYLIB is assigned in the Stored Process Server's autoexec using the V9 engine, and this same LIBREF is reassigned in a stored process using the SPDE engine or SPDS engine, such an action might cause an Access Violation.

The following scenario illustrates the problem.

  1. In the AUTOEXEC file for the SAS Stored Process Server, specify the following libname statement:
    libname mylib V9 "<your path here>";
  2. In the Stored Process code specify:
    libname mylib spde "<your path here>";
  3. Run the stored process. An Access Violation might occur immediately after the new LIBNAME assignment, or might occur during the execution of a later step.

If you encounter this problem, then check the autoexec file of the SAS Stored Process Server for an allocation of the LIBREF that you are trying to reallocate. Also, check the SAS® Management Console (under Data Library Manager) for a pre–assigned library with the same LIBREF). Then, perform EITHER of the following steps:

  • Change the LIBNAME engine of the pre–assigned library to match the LIBNAME engine that is used when the library is reassigned.
  • Change the LIBREF name in the stored process code to another name that is not already pre–assigned.

If a LIBREF is pre–assigned and the stored process code attempts to CLEAR it (using the CLEAR option on a LIBNAME statement), it will not be cleared and the following WARNING message will appear in the log file for the SAS Stored Process Server:

WARNING: Library <libref name here> is not assigned in this scope.

The following statement (inserted at the top of the stored process code) can be used to determine if a library called "mylib" is already pre–assigned and will determine which engine it is using:

libname mylib list;

The Stored Process Server log file should contain information (at the top) about the libraries that are pre–assigned. This log file should be in a location that is similar to the following:

/<SAS BI Root Path>/Lev1/SASMain/StoredProcessServer/logs/

In the Windows environment, the following error messages might occur if you encounter this problem:

ERROR: Generic critical error.

STP_ERR: A failure occurred in reading the Sas Log for Context
ERROR:  Read Access Violation In Task [ DOSSCHT  )

In the UNIX environment, the following error messages might occur if you encounter this problem:

Segmentation Violation In Task [ <task name here> ( ]
Fault and traceback information not available
Task Traceback


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS Integration TechnologiesMicrosoft® Windows® for x649.1 TS1M3 SP49.2 TS2M0
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP49.2 TS2M0
z/OS9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.2 TS2M0
Microsoft Windows XP Professional9.1 TS1M3 SP49.2 TS2M0
64-bit Enabled AIX9.1 TS1M3 SP49.2 TS2M0
64-bit Enabled HP-UX9.1 TS1M3 SP49.2 TS2M0
64-bit Enabled Solaris9.1 TS1M3 SP49.2 TS2M0
HP-UX IPF9.1 TS1M3 SP49.2 TS2M0
Linux9.1 TS1M3 SP49.2 TS2M0
Linux on Itanium9.1 TS1M3 SP49.2 TS2M0
OpenVMS Alpha9.1 TS1M3 SP49.2 TS2M0
Solaris for x649.1 TS1M3 SP49.2 TS2M0
Tru64 UNIX9.1 TS1M3 SP49.2 TS2M0
* 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.