LENGTH Statement: Windows

Specifies the number of bytes SAS uses to store numeric variables.
Valid in: a DATA step
Windows specifics: Valid numeric variable lengths; valid values for length; valid values for n
See: LENGTH Statement in SAS Statements: Reference

Syntax

LENGTH <variable-1> <…variable-n> <$> <length> <DEFAULT=n> ;

Required Arguments

length
Under Windows, can range from 3 to 8 bytes for numeric variables.
DEFAULT=n
changes the default number of bytes used for storing the values of newly created numeric variables from 8 to the value of n. Under Windows, the value of n can range from 3 to 8 bytes.

Details

The LENGTH statement specifies the number of bytes SAS is to use for storing values of variables in each data set being created.
CAUTION:
Any length less than 8 bytes can result in a loss of precision for the value of the variable.