Chapter Contents

Previous

Next
The FORMS Procedure

PROC FORMS Statement


PROC FORMS <option(s)>;

To do this Use this option
Specify the input data set DATA=
Identify an external file for PROC FORMS to write to FILE=
Control the dimensions of a form

Specify the number of lines in a form unit LINES=

Specify the number of columns across the form unit WIDTH=
Control the placement of the forms

Specify the number of form units to print across the page ACROSS=

Specify the number of spaces to print between form units BETWEEN=

Specify the number of lines to skip on a page before printing the first form unit DOWN=

Specify the number of spaces to indent before printing the first form unit in each row INDENT=

Specify the number of form units to print down the page NDOWN=

Specify the number of lines on a page of forms PAGESIZE=

Specify the number of lines to skip between form units SKIP=
Control the number of each form unit that PROC FORMS prints

Specify the number of form units to produce for each observation in each set of form units COPIES=

Specify the number of sets of form units to produce SETS=
Control the placement of page eject characters CC
Specify the number of lines of dummy form units to print ALIGN=


Options

ACROSS=form-units-per-line
specifies the number of form units to print across the page. (See Sample Placement for Forms .)
Alias: A=
Default: 1
Range: 1-200
Featured in: Printing a Single Form Unit for Each Observation

ALIGN=number
controls the number of alignment form units that print before the actual data values. Use the alignment form units, which consist solely of Xs, to check printer alignment.
Default: 8 with FILE=; 0 without FILE=
Interaction: If you use ACROSS=, the number of dummy form units that print is the product of the values of ACROSS= and ALIGN=.
Featured in: Printing a Single Form Unit for Each Observation

BETWEEN=spaces-between-form-units
specifies the number of spaces to print between form units. (See Sample Placement for Forms .)
Alias: B=
Default: 1
Range: 1-200
Featured in: Printing a Single Form Unit for Each Observation

CC
in continuous mode, writes a page-eject character at the top of the first page. In page mode, if you also specify FILE=, CC writes a page-eject character at the top of each page. (CC has no effect if you omit FILE=.) For a discussion of page mode and continuous mode, see Modes of Operation .
Tip: If you omit CC, PROC FORMS issues blank lines to go to the next page. We recommend that you always use CC with page-mode operation.
Featured in: Printing Two Sets of Mailing Labels

COPIES=number
specifies the number of form units to produce for each observation in each set of form units. All copies of an observation appear together.
Alias: C=
Default: 1
Featured in: Writing Multiple Copies of a Label within a Single Set of Labels

DATA=SAS-data-set
identifies the input SAS data set.

DOWN=top-margin
specifies the number of lines to skip on a page before printing the first form unit. (See Sample Placement for Forms .)
Alias: D=
Default: 1
Range: 1-200
Featured in: Printing a Single Form Unit for Each Observation

Note:   When PROC FORMS writes to the procedure output file, it uses one line for each TITLE statement and leaves a blank line beneath the last title. Counting for the top margin begins at the next line. Thus, if you have two TITLE statements and specify DOWN=5, PROC FORMS begins printing the first form unit on each page on line 9.  [cautionend]

FILE=fileref
identifies an external file for PROC FORMS to write to. Use the FILENAME statement to associate an external file with a fileref (see SAS Language Reference: Concepts).
Alias: DDNAME=, D=
Default: If you omit FILE=, PROC FORMS writes to the procedure output file and selects page mode.
Interaction: If you use FILE= and do not specify the ALIGN= option, PROC FORMS uses ALIGN=8.
Interaction: When you use FILE=, PROC FORMS honors DOWN= only on the first page of form units.
Interaction: If you use FILE= with NDOWN= or PAGESIZE= or both, you select page mode. Otherwise, you select continuous mode.
Featured in: Printing a Single Form Unit for Each Observation

INDENT=left-margin
specifies the number of spaces to indent before printing the first form unit in each row. (See Sample Placement for Forms .)
Alias: I=
Default: 0
Range: 0-200

LINES=form-unit-length
specifies the number of lines in a form unit. (See Sample Placement for Forms .)
Alias: L=
Default: the largest number used with the LINE statement
Range: 1-200

NDOWN=form-units-per-page
specifies the number of form units to print down the page and selects page-mode operation. (See Sample Placement for Forms .)
Alias: ND=
Default: FLOOR((PAGESIZE-DOWN+SKIP)/(LINES+SKIP)) where FLOOR is a SAS function that returns the largest integer less than or equal to the value of the argument.
Interaction: If NDOWN= specifies a number of form units that is less than PAGESIZE= allows, PROC FORMS honors NDOWN=. If NDOWN= specifies a number of form units that is greater than PAGESIZE= allows, PROC FORMS adjusts the value of NDOWN= downwards to accommodate the page size.
Featured in: Printing Two Sets of Mailing Labels

PAGESIZE=lines-per-page
specifies the number of lines on a page of forms after allowing for TITLE statements and a blank line following the titles. (See Sample Placement for Forms .) It also selects page-mode operation.
Alias: PS=
Default: the system page size (with FILE=); inferred from the characteristics of the procedure output file and from title information (without FILE=)
Range: the value of DOWN= plus the value of LINES=, up to 10,000
Interaction: When you write to the procedure output, if the page size that you specify is greater than the page size specified by the SAS system option PAGESIZE=, PROC FORMS adjusts the PROC FORMS page size to accommodate the system page size.
Interaction: If the page size allows for more form units than NDOWN= specifies, PROC FORMS honors the NDOWN= option. If the page size does not allow for as many form units as NDOWN= specifies, PROC FORMS adjusts the value of NDOWN= to accommodate the page size.

SETS=number
specifies the number of sets of form units to produce. In page-mode operation, PROC FORMS starts each set on a new page.
Default: 1
Featured in: Printing Two Sets of Mailing Labels

SKIP=lines-between-form-units
specifies the number of lines to skip between form units. (See Sample Placement for Forms .)
Alias: S=
Default: 1
Range: 1-200
Featured in: Printing a Single Form Unit for Each Observation

WIDTH=form-unit-width
specifies the number of columns across the form unit. PROC FORMS truncates values that do not fit in the specified width. (See Sample Placement for Forms .)
Alias: W=
Default: width of the widest line
Range: 1-255
Featured in: Printing a Single Form Unit for Each Observation


Chapter Contents

Previous

Next

Top of Page

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