Chapter Contents

Previous

Next
The FORMS Procedure

Concepts


Form Layout
The size and spacing of form units are controlled by options in the PROC FORMS statement, as illustrated in Sample Placement for Forms . (See also the discussion of these options .)

Sample Placement for Forms

[IMAGE]

The values of the variables specified in LINE statements are formatted into a form unit that is WIDTH= columns wide and LINES= lines long. Values that do not fit into WIDTH= columns are truncated. ACROSS= form units are printed across the page, with BETWEEN= spaces between adjacent form units. The forms are indented INDENT= spaces from the left margin. SKIP= blank lines are printed between form units down the page.


Modes of Operation
PROC FORMS operates in two modes: continuous mode and page mode. Continuous mode is for forms that feed continuously through a printer, without the printer's needing to perform page ejects. Page mode is for forms that use separate pieces of paper for each form unit or for multiple form units (such as sheets of labels that come with 30 labels per sheet of paper).

By default, PROC FORMS uses page mode. To select continuous mode, you must specify FILE= and must not specify NDOWN= or PAGESIZE=.

In Continuous Mode, PROC FORMS Always Writes to an External File

When it writes in continuous mode, PROC FORMS
  1. skips the number of lines specified by DOWN=

  2. prints one form unit

  3. skips the number of lines specified by SKIP=

  4. repeats steps 2 and 3 until it uses all the data.

By default, in continuous mode the first eight form units are dummy form units that consist solely of Xs. These forms give the printer operator a chance to align the printer before real form units begin to print. Use ALIGN= to alter the number of dummy form units. Once the dummy form units are aligned to the physical forms, the file prints correctly. Carriage control characters are unnecessary.

In Page Mode, PROC FORMS Can Write Either to an External File or to the Procedure Output File

In page mode, PROC FORMS
  1. goes to the top of a new page

  2. skips the number of lines specified by DOWN=

  3. prints the number of form units specified by NDOWN= down the page, or if you omit NDOWN=, prints the maximum number of form units allowed by the page size

  4. repeats steps 1 to 3 until it uses all the data.

When PROC FORMS has written as many form units as you specified, either it writes a blank line for each line remaining on the page (as determined by the PAGESIZE= option) or it writes a page-eject character. If you are writing to the procedure output file, PROC FORMS always writes the page-eject characters. If you have specified FILE=, PROC FORMS by default writes blank lines, but if you specify the CC option, it writes page eject characters instead.

In page mode, the easiest way to ensure proper alignment is to specify the number of form units to print down the page with the NDOWN= option and to use CC to write a page-eject character at the beginning of each page. If you omit CC, be sure that the page size is set correctly. If it isn't, the number of blank lines that PROC FORMS writes will not take you to the top of the next page.

Note:   We recommend that you always use CC when you use page mode with the FILE= option.   [cautionend]

CAUTION:
The procedure output file contains some things that you may not want on your forms. If you omit the FILE= option, the output from PROC FORMS goes to the procedure output file. If the DATE and NUMBER options are in effect, the output will contain dates and page numbers. If any titles or footnotes are defined, they will appear in the output as well.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

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