Valid in: | DATA step |
Category: | Information |
Type: | Declarative |
See: | LENGTH Statement under Windows, UNIX, and z/OS |
CAUTION: |
Avoid shortening
numeric variables that contain fractions.
The precision of a
numeric variable is closely tied to its length, especially when the
variable contains fractional values. You can safely shorten variables
that contain integers according to the rules that are given in the
SAS documentation for your operating environment, but shortening variables
that contain fractions might eliminate important precision.
|
data testlength; informat FirstName LastName $15. n1 6.2; input firstname lastname n1 n2; length name $25 default=4; name=trim(lastname)||', '||firstname; datalines; Alexander Robinson 35 11 ; proc contents data=testlength; run; proc print data=testlength; run;