Usage Note 20522: WHERE function on Variable Values List Model dataSetID attribute returns
all rows
If you use the WHERE function in SAS Component Language (SCL) on the
dataSetID attribute of the Variable Values List model in SAS/AF
software, the model might return all rows from the data set instead of
the requested subset of rows. For example, if you execute the following
set of statements, all of the rows in the data set are returned:
variablevalueslist1.dataSet='sashelp.class';
variablevalueslist1.variable='name';
rc=where(variablevalueslist1.dataSetID,'sex="F"');
You see this behavior because the Variable Values List Model populates
the list of values as soon as the dataSet and variable attributes have
been assigned valid values. If you later apply a WHERE clause to the
data set, the list of values will not be updated unless the value of the
variable attribute changes. Therefore, you will need to reorder the
statements so the WHERE function executes after the dataSet attribute
and before the variable attribute is defined. For example,
variablevalueslist1.dataSet='sashelp.class';
rc=where(variablevalueslist1.dataSetID,'sex="F"');
variablevalueslist1.variable='name';
Operating System and Release Information
SAS System | SAS/AF | Microsoft Windows XP Professional | 9.1 TS1M3 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
Linux | 9.1 TS1M3 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
64-bit Enabled Solaris | 9.1 TS1M3 | |
Linux on Itanium | 9.1 TS1M3 | |
HP-UX IPF | 9.1 TS1M3 | |
64-bit Enabled HP-UX | 9.1 TS1M3 | |
OpenVMS Alpha | 9.1 TS1M3 | |
64-bit Enabled AIX | 9.1 TS1M3 | |
Tru64 UNIX | 9.1 TS1M3 | |
*
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: | Usage Note |
Priority: | medium |
Date Modified: | 2007-08-29 12:12:27 |
Date Created: | 2007-07-05 14:52:46 |