Chapter Contents |
Previous |
Next |
SAS Companion for UNIX Environments |
The FORMS subsystem for UNIX consists of six frames:
Note: Forms are available only if you have turned off
host printing. See Turning Host Printing On and Off
for more information.
Creating or Editing a Form |
You can create or edit a form through the FORM window or with the FSFORM command.
To open the FORM window, select
File | Print Utilities... | Open a form... |
You can also create or edit a form by entering the FSFORM command:
FSFORM <catalog-name.>form-name |
If you are creating a new form, SAS displays the Printer Selection frame. If you are editing an existing form, SAS displays the Text Body and Margin Information frame.
To move between the FORMS frames, you can
=1
displays the Text Body and Margin Information frame, and
=2
displays the Carriage Control Information
frame.
After you have finished defining or editing your form, issue the END command to save your changes and exit the FORM window.
Printer Selection |
If you are defining a new form, SAS displays the Printer Selection
frame. The following display shows the frame that is opened if you enter the
command
fsforms hpljletr
.
FORMS Printer Selection Frame
The Form description field contains the name that you specified when you invoked the FORM window. You can change this description to be more descriptive.
The default Printer Selection frame contains a list of all of the types of printers that are available with the FORMS subsystem under UNIX. However, your system administrator might have modified this list to include only the printers that are available at your site. Select the type of printer for which you are defining this form. If the list does not contain the specific printer type that you want, choose a similar type. For example, if you are defining a form for a Hewlett Packard Laserjet IVsi, select Hewlett Packard Laserjet (+). Your selection is used only to define the control and escape sequences in the Font Control Information frame. If you have to choose a similar printer, you can still take advantage of any additional features that are provided with your printer through the Printer Control Language frame.
You cannot move to the remaining frames until you choose a printer type, and after you have chosen a printer type, you cannot return to this frame and change it. The only way to change the printer type is by deleting the form and redefining it with the new printer type.
Text Body and Margin Information |
Note: If you specify -99
for a value in this frame, then the form will use the values that are specified
with the corresponding system option. It is recommended that you use -99 for
the Characters per line, Lines of
first page, and Lines of following
whenever possible.
In the example shown in FORMS Text Body and Margin Information Frame, the settings have been set for using letterhead paper.
FORMS Text Body and Margin Information Frame
If you need to set these values to a specific setting (rather than -99), then the values that you specify should be less than the corresponding system option. If your LINESIZE and PAGESIZE settings are greater than the values that you have specified in this frame, then you may have extra page breaks (blank pages) in the middle of your output.
Carriage Control Information |
If you enter any escape sequences for this form (through the Printer Control Language frame), then you should select First Text Page in this frame. Blank lines containing the printer control language are printed at the top of the first page, and if First Text Page is not selected, then each page of your output will wrap across multiple pages.
FORMS Carriage Control Information Frame
It is recommended that you leave the default values turned on in this frame. The default values generate a page break before the first text page and following each text page.
UNIX Print File Parameters |
Note: You can also specify default destinations with
the SYSPRINT option and in the $LPDEST environment variable. If you specify
several forms that use the same destination, you may need to modify these
forms if your site acquires a new printer. See Changing the Default Destination for more information.
This frame also allows
you to specify other options
for the print command that you use. For example, if you use the
lp
command to print, you can add a title by using
the
-t
option:
-t "Report Log"
Note: Enclose any strings in your
option specifications in double quotation marks("), not single quotation marks.
If you select Send mail after file is printed, then
lp
uses the
-m
option to send
you notification of any problems.
The example shown in FORMS UNIX Print File Parameters Frame uses two additional options:
-ox |
prints in simplex mode. |
-opcl |
indicates that the print file contains special control characters. |
FORMS UNIX Print File Parameters Frame
Other options that you may want to consider are
-ascii |
specifies that the print file contains ASCII text. |
-pn |
sets the priority of your print job to n, where n is a number from 0 to 7, inclusive. The highest priority is 7. |
-oh |
suppresses the printing of the header page. |
-otext |
specifies that the print file contains only text and no PCL statements. |
If you get the message
unrecognized file type
when you try to print, then you might be trying
to send PCL statements to the printer but have not specified the correct options.
You may need to tell the printer that your file contains a mixture of ASCII
and PCL sequences. You may need to specify the
-opcl
or
-oraw
options.
See also Changing the Default Print Command.
Font Control Information |
FORMS Font Control Information Frame
If you need to customize the font control information, use the top of this frame to define up to eight special characters that represent printer control characters. You can then use these characters in the bottom of the frame to define text attributes such as underline, bold, subscripts, and so on. Font control information is specific to each printer or output device and can be found in the documentation for your printer or device.
Printer Control Language |
FORMS Printer Control Language Frame
The example shown in FORMS Printer Control Language Frame contains several control sequences:
PRINT
INIT |
indicates that the control sequence
that follows is to be sent to the printer when the print job starts. The
~&11H control sequence specifies
that the first sheet of paper for the print job is pulled from the top drawer.
The first sheet is typically a header page. |
PAGE 1 | indicates that the control sequence
that follows is to be sent to the printer before the first page of output
is printed. Since our example form is for printing on letterhead paper, the
control sequence
~&14H
specifies that the first page of output is taken from the bottom paper drawer,
which contains the letterhead paper. The sequence specified after PAGE 1 will
be used for each page until a different sequence is sent to the printer. |
PAGE 2 | indicates that the control sequence
that follows is to be sent to the printer before the second page of output
is printed. The
~&11H
sequence specifies that the paper for the second page is pulled from the top
drawer, which contains regular paper. Since no other control sequences are
specified for the remaining pages of the print job, paper will be pulled from
the top drawer for all of the remaining pages. |
PRINT
TERM |
indicates that the control sequence
that follows is to be sent to the printer when the print job terminates. The
~E sequence resets the printer
to its initial settings. |
Other control sequences that you might find useful are
~&l10 |
turns on landscape mode. |
~&k2S |
turns on compressed mode. |
Specifying Your Default Form |
You can specify your default form by
Tools | Options | System... |
File | Print Utilities | Set Form Name |
options forms=sasuser.myforms.hpljletr;For more information on specifying system options, see Specifying System Options.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.