SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3

Writes variable values after the variable name and an equal sign

Valid: in a DATA step

Category: File-handling

Type: Executable

Syntax

PUT < pointer-control > variable =< format. > <@ @@>;

PUT variable = start-column < ” end-column >

Arguments

pointer-control

variable =

format.

start-column

” end-column

.decimal-places

@@@

Details

Using Named Output With named output, follow the variable name with an equal sign in the PUT statement. You can use either list output, column output, or formatted output specifications to indicate how to position the variable name and values. To insert a blank space between each variable value automatically, use list output. To align the output in columns, use pointer controls or column specifications.

Formatting Named Output You can specify either a SAS format or a user -written format to control how SAS prints the variable values. The width of the format does not include the columns required by the variable name and equal sign. To align a formatted value, SAS deletes leading blanks and writes the variable value immediately after the equal sign. SAS does not align on the right side of the formatted length, as in unnamed formatted output.

For a complete description of the SAS formats, see Definition of Formats on page 71.

Examples

Use named output in the PUT statement as shown here.

See Also

Statement:

Категории