Problem Note 19607: ATTRC function in SAS Component Language does not return label for an
SQL view
If you query the label attribute of an SQL view with the ATTRC function
in SAS Component Language (SCL) in either an SCL program or the DATA
step, the function returns a missing value instead of the label.
To circumvent this problem, you can use PROC CONTENTS to create an
output dataset with the table information and query the MEMLABEL column
for the label. For example, in an SCL program, you can execute the
following code to retrieve the label of the view MYLIB.MYVIEW:
dcl char(40) viewLabel;
INIT:
submit continue sql;
select memlabel: into my_macro_var
from dictionary.tables
where libname="WORK" and memname="MYSQLVIEW"
and memtype="VIEW";
endsubmit;
viewLabel = symget('my_macro_var');
return;
Operating System and Release Information
SAS System | SAS/AF | Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | 9.2 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | 9.2 TS1M0 |
z/OS | 9.1 TS1M3 | 9.2 TS1M0 |
Linux | 9.1 TS1M3 | 9.2 TS1M0 |
Linux on Itanium | 9.1 TS1M3 | |
OpenVMS Alpha | 9.1 TS1M3 | |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.2 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.2 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.2 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.2 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 |
Topic: | SAS Reference ==> SCL (SAS Component Language)
|
Date Modified: | 2007-03-05 18:04:19 |
Date Created: | 2007-02-21 12:56:57 |