Chapter Contents

Previous

Next
The FORMS Procedure

LINE Statement


Specifies the information to print on one line of the form unit. Use one LINE statement for each line of the form unit.

LINE line-number variable(s) </ option(s)>;

To do this Use this option
Specify the number of spaces to indent the line within the form unit INDENT=
Rotate the words in a character variable that contains a comma around the comma and remove the comma LASTNAME
Remove extra blanks from the line so that one blank separates variables PACK
Remove periods that represent missing values from a line that contains no other values. REMOVE


Required Arguments

line-number
identifies the number of the line. You can specify lines in any order. You do not need a LINE statement for a blank line.
Range: An integer between 1 and the value of LINES= in the PROC FORMS statement

variable(s)
specifies one or more variables to print on this line of the form unit. The FORMS procedure inserts one space between each value. By default, the width of a variable's field in the form unit is the formatted length of that variable. Default formats are the length of the variable for character variables and BEST12. for numeric variables.
Interaction: If the length of all values in a line is longer than the value of WIDTH= specified in the PROC FORMS statement, PROC FORMS truncates the values (starting with the rightmost value in the line) to fit the WIDTH= value. For information on squeezing variables onto a line, see PACK .


Options

INDENT=margin-within-form-unit
specifies the number of spaces to indent the line within the form unit. Contrast this option to INDENT= in the PROC FORMS statement, which specifies the size of the left margin preceding the first form unit in each row.
Alias: I=
Featured in: Printing a Single Form Unit for Each Observation

LASTNAME
rotates the words in a character variable that contains a comma around the comma and removes the comma.
Alias: L
Featured in: Printing a Single Form Unit for Each Observation

PACK
removes extra blanks from the line so that one blank separates variables.
Alias: P
Tip: PACK can squeeze fields onto a form unit, but if the values for all the variables are long, you may lose an entire field. To avoid this problem, use a FORMAT statement to limit the space for each variable. For example, the following statement sets the field widths of the variables CITY and STATE to 20 and 2 columns, respectively:
   format city $20. state $2.;
Featured in: Printing a Single Form Unit for Each Observation

REMOVE
removes periods that represent missing values from a line that contains no other values.
Alias: R


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.