Problem Note 36636: "ERROR: Invalid memptr" occurs when accessing an SQL view defined with an embedded libname using the META engine
The following error message is produced when reading from an SQL view that is created with an embedded LIBNAME statement that specifies the META engine:
ERROR: Invalid memptr.
For example, suppose you defined the following view from the table INVALID_MEMPTR_TEST that is accessed from the "Test Library" metadata library via the META engine:
proc sql;
create view work.INVALID_MEMPTR_VIEW AS
select *
from test.INVALID_MEMPTR_TEST
using libname test META library="Test Library";
run;
The error occurs when reading the view, as in these two steps:
data read_view;
set work.INVALID_MEMPTR_VIEW;
run
proc print data=work.INVALID_MEMPTR_VIEW;
run;
If you are submitting your program in batch mode, or to a Workspace Server or stored process server, the correct number of observations from the underlying table are read through the view. However, the SAS System option OBS is set to 0 and the program continues in syntax check mode. This mode of execution will occur when projects and jobs are run using SAS® Enterprise Guide®, SAS® Data Integration Studio, and other clients.
If you are submitting your program in an interactive mode, such as Display Manager Mode or Interactive Line Mode, the correct number of observations are read through the view and the program continues to run normally.
As a circumvention, use the appropriate SAS® or DBMS engine on the LIBNAME in the view definition. For example:
proc sql;
create view work.INVALID_MEMPTR_VIEW AS
select *
from test.INVALID_MEMPTR_TEST
using libname test BASE "C:\sasdata\tables";
run;
See SAS Note 19486 "'ERROR: Invalid memptr' occurs and the SAS® session becomes unresponsive when trying to access a view via a libref with the META LIBNAME engine" for a related problem.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.3 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.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-07-11 10:15:00 |
Date Created: | 2009-07-27 14:59:13 |