![]() | ![]() | ![]() | ![]() | ![]() |
WARNING: Multiple lengths were specified for the variable VOLTYPE by input data set(s). This may cause truncation of data.
When a variable's length is changed to be shorter, the possibility of data truncation exists.
SAS sessions that check the return code now return rc=4 when a LENGTH statement is used to change the length of character variables and some numeric variables.
Placing a LENGTH statement immediately following the DATA statement is a standard practice for changing the length of a variable on the input data set(s).
Character variable length is set in the Program Data Vector (PDV) by the length found in the first reference in the DATA step code.
Numeric variables are defined in the PDV as 8 bytes. The length of a numeric variable is determined by the last reference to the variable in the DATA step. The length is set when the variable is written to the output data set.
A new option is implemented that turns this behavior on and off.
For more information see VARLENCHK= System OptionTo get the same behavior as SAS 9.1.3, use the following:
options varlenchk=nowarn;
The hotfix turns off the warning and does not set return code, restoring the SAS 9.1.3 behavior.
Select the Hot Fix tab in this note to access the hot fix.
| Product Family | Product | System | SAS Release | |
| Reported | Fixed | |||
| SAS System | Base SAS | z/OS | 9.2 TS1M0 | 9.2 TS2M0 |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows 2000 Advanced Server | 9.2 TS1M0 | |||
| Microsoft Windows 2000 Datacenter Server | 9.2 TS1M0 | |||
| Microsoft Windows 2000 Server | 9.2 TS1M0 | |||
| Microsoft Windows 2000 Professional | 9.2 TS1M0 | |||
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Microsoft Windows XP Professional | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Windows Vista | 9.2 TS1M0 | 9.2 TS2M0 | ||
| 64-bit Enabled AIX | 9.2 TS1M0 | 9.2 TS2M0 | ||
| 64-bit Enabled HP-UX | 9.2 TS1M0 | 9.2 TS2M0 | ||
| 64-bit Enabled Solaris | 9.2 TS1M0 | 9.2 TS2M0 | ||
| HP-UX IPF | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Linux | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Linux for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
| OpenVMS on HP Integrity | 9.2 TS1M0 | 9.2 TS2M0 | ||
| Solaris for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
/* character variables */
data new;
set sashelp.class;
length Name $5;
run;
data new2;
length Name $5;
set sashelp.class;
run;
/* numeric variables */
data seven;
length x 7;
x=7;
data before76smaller;
length x 6;
set seven;
data after76smaller;
set seven;
length x 6;
data before78larger;
length x 8;
set seven;
data after78larger;
set seven;
length x 8 ;
proc contents data= work._all_;
title inconsistent WARNING and unexpected LENGTH changes;
run;
A fix for SAS 9.2 (TS1M0) for this issue is available at:
http://www.sas.com/techsup/download/hotfix/f9_sbcs_prod_list.html#031850A fix for SAS 9.2 (TS1M0) with Asian Language Support (DBCS) for this issue is available at:
http://www.sas.com/techsup/download/hotfix/f9_dbcs_prod_list.html#031850| Type: | Problem Note |
| Priority: | high |
| Topic: | SAS Reference ==> Statements ==> Information ==> LENGTH |
| Date Modified: | 2010-04-14 09:20:57 |
| Date Created: | 2008-04-18 17:07:11 |





