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

Writes variable values in the specified columns in the output line

Valid: in a DATA step

Category: File-handling

Type: Executable

Syntax

PUT variable start-column < ” end-column >

Arguments

variable

start-column

” end-column

.decimal-places

@ @@

Details

With column output, the column numbers indicate the position that each variable value will occupy in the output line. If a value requires fewer columns than specified, a character variable is left-aligned in the specified columns, and a numeric variable is right-aligned in the specified columns.

There is no limit to the number of column specifications you can make in a single PUT statement. You can write anywhere in the output line, even if a value overwrites columns that were written earlier in the same statement. You can combine column output with any of the other output styles in a single PUT statement. For more information, see Using Multiple Output Styles in a Single PUT Statement on page 1348.

Examples

Use column output in the PUT statement as shown here.

See Also

Statement:

[ *] The ruled line is for illustrative purposes only; the PUT statement does not generate it.

Категории