Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Defining Forms

The FORMS subsystem for UNIX consists of six frames:

These frames are referred to as the FORM window. You use the FORM window to define a form for each printer that is available to you at your site. You can also define multiple forms for the same printer. Your SAS Support Consultant can give you information about your default form and about any other forms that have been defined at your site.

Note:   Forms are available only if you have turned off host printing. See Turning Host Printing On and Off for more information.  [cautionend]


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
[arrow]
Print Utilities...
[arrow]
Open a form...
SAS prompts you to enter the library, catalog, and form name. You can also select whether you want this form to be your default form. (You can change you default form at any time using the methods described in f.)

You can also create or edit a form by entering the FSFORM command:

FSFORM <catalog-name.>form-name
If you do not specify a catalog-name, SAS uses the SASUSER.PROFILE catalog. If the form name that you specify does not exist, SAS creates a new form.

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

You can move between fields on a frame with the TAB key.

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

[IMAGE]

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

The Text Body and Margin Information frame allows you to change the defaults for lines per page, columns per line, top and bottom margins, and so on. The values that you specify in this frame for Characters per line will overrride the value that is specified with the LINESIZE system option, and Lines on first page and Lines of following will override the value that is specified with the PAGESIZE system option.

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.  [cautionend]

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

[IMAGE]

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

In this frame, you can select where you want page eject instructions to be entered in the output. An asterisk (*) indicates that the option is selected.

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

[IMAGE]

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

This frame enables you to enter the number of copies that you need and the destination (name of the printer) where you want the output to be printed.

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.  [cautionend]

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.  [cautionend]

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

[IMAGE]

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.
Refer to the man page for your print command for a complete list of the options that you can specify in this frame.

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

The attributes, such as underline and highlight, that you can define in this frame are determined by the printer that you selected in the Printer Selection frame. For example, some printers do not support certain attributes such as highlight. Normally, you will not need to modify or add to the information shown in this frame.

FORMS Font Control Information Frame

[IMAGE]

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

This frame allows you to enter sequences of printer control language (PCL) that you want sent to the printer with your print job stream. With PCL, you can control fonts, orientation, paper drawer, and so on. For a complete list of the control sequences that you can enter on your form, refer to the documentation for your print device.

FORMS Printer Control Language Frame

[IMAGE]

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

SAS is shipped with a default form defined in SASHELP.BASE. If you do not define any other forms or modify the default form, SAS uses SASHELP.BASE.DEFAULT.FORM when you are printing with forms.

You can specify your default form by


Chapter Contents

Previous

Next

Top of Page

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