Problem Note 61271: The ATTRIB statement can cause variable values to be truncated in a Solaris S64 operating environment
Some variable values might be truncated when you use an ATTRIB statement to set the lengths of variables. This issue is unique to the Solaris S64 operating environment.
To circumvent the problem, remove the ATTRIB statement and use a LENGTH statement to set the variable lengths.
The sample program on the Full Code tab illustrates the problem. Click the Output tab to see the output that is written to the SAS® log.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled Solaris | 9.3_M2 | 9.4_M5 | 9.3 TS1M2 | 9.4 TS1M5 |
*
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.
The presence of the ATTRIB statement causes the value of Var1 to become truncated after Var2=Src2. When the ATTRIB statement is commented out and the LENGTH statement is active, there is no longer a problem with the value of Var2.
data test;
attrib
src1 label = "Source 1" length = $2017
src2 label = "Source 2" length = $30761
var1 label = "Result 1" length = $2017
var2 label = "Result 2" length = $30766;
* length src1 var1 $2017 src2 $30761 var2 $30766;
src1 = "SAS is bug free!";
src2 = " ";
var1 = src1;
put "Before: " var1= $20.;
var2 = src2;
put "After: " var1= $20.;
run;
/* When the ATTRIB statement is uncommented and the LENGTH statement is commented out, */
/* the following results are written to the log: */
Before: var1=SAS is bug free!
After: var1=SAS is bug !
/* When the ATTRIB statement is commented out and the LENGTH statement is uncommented, */
/* the following results are written to the log: */
Before: var1=SAS is bug free!
After: var1=SAS is bug free!
Type: | Problem Note |
Priority: | high |
Date Modified: | 2017-11-07 09:24:40 |
Date Created: | 2017-10-20 08:42:55 |