REPORT Procedure

LINE Statement

Provides a subset of the features of the PUT statement for writing customized summaries.
Restrictions: This statement is valid only in a compute block that is associated with a location in the report.

You cannot use the LINE statement in conditional statements (IF-THEN, IF-THEN/ELSE, and SELECT) because it is not executed until PROC REPORT has executed all other statements in the compute block.

Ordering the Rows in a Report

Using Aliases to Obtain Multiple Statistics for the Same Variable

Consolidating Multiple Observations into One Row of a Report

Creating a Column for Each Value of a Variable

Writing a Customized Summary on Each Page

Syntax

Required Argument

specification(s)
can have one of the following forms. You can mix different forms of specifications in one LINE statement.
item item-format
specifies the item to display and the format to use to display it, where
item
is the name of a data set variable, a computed variable, or a statistic in the report. For information about referencing report items, see Four Ways to Reference Report Items in a Compute Block.
item-format
is a SAS format or user-defined format. You must specify a format for each item.
'character-string '
specifies a string of text to display. When the string is a blank and nothing else is in specification(s), PROC REPORT prints a blank line.
Note: A hexadecimal value (such as 'DF'x) that is specified within character-string will not resolve because it is specified within quotation marks. To resolve a hexadecimal value, use the %sysfunc(byte(num)) function, where num is the hexadecimal value. Be sure to enclose character-string in double quotation marks (" ") so that the macro function will resolve.
number-of-repetitions*'character-string '
specifies a character string and the number of times to repeat it.
pointer-control
specifies the column in which PROC REPORT displays the next specification. You can use either of the following forms for pointer controls:
@column-number
specifies the number of the column in which to begin displaying the next item in the specification list.
+column-increment
specifies the number of columns to skip before beginning to display the next item in the specification list.
Both column-number and column-increment can be either a variable or a literal value.
Restriction:The pointer controls are designed for monospace output. They have no effect in the HTML, RTF, or Printer output.

Details

Differences between the LINE and PUT Statements

The LINE statement does not support the following features of the PUT statement:
  • automatic labeling signaled by an equal sign (=), also known as named output
  • the _ALL_, _INFILE_, and _PAGE_ arguments and the OVERPRINT option
  • grouping items and formats to apply one format to a list of items
  • pointer control using expressions
  • line pointer controls (# and /)
  • trailing at signs (@ and @@)
  • format modifiers
  • array elements