Previous Page | Next Page

The PRTDEF Procedure

Input Data Set: PRTDEF Procedure


Summary of Valid Variables

To create your printer definitions, you must create a SAS data set whose variables contain the appropriate printer attributes. The following table lists and describes both the required and the optional variables for this data set.

Variable Name Variable Description
Required

DEST Destination

DEVICE Device

MODEL Prototype

NAME Printer name
Optional

BOTTOM Default bottom margin

CHARSET Default font character set

DESC Description

FONTSIZE Point size of the default font

HOSTOPT Host options

LEFT Default left margin

LRECL Output buffer size

OPCODE Operation code

PAPERIN Paper source or input tray

PAPEROUT Paper destination or output tray

PAPERSIZ Paper size

PAPERTYP Paper type

PREVIEW Preview

PROTOCOL Protocol

RES Default printer resolution

RIGHT Default right margin

STYLE Default font style

TOP Default top margin

TRANTAB Translation table

TYPEFACE Default font

UNITS CM or IN units

VIEWER Viewer

WEIGHT Default font weight


Required Variables

To create or modify a printer, you must supply the NAME, MODEL, DEVICE, and DEST variables. All the other variables use default values from the printer prototype that is specified by the MODEL variable.

To delete a printer, specify only the required NAME variable.

The following variables are required in the input data set:

DEST

specifies the output destination for the printer.

Operating Environment Information:   DEST is case sensitive for some devices.  [cautionend]

Restriction: DEST is limited to 1023 characters.
DEVICE

specifies the type of I/O device to use when sending output to the printer. Valid devices are listed in the Printer Definition wizard and in the SAS Registry Editor.

Restriction: DEVICE is limited to 31 characters.
MODEL

specifies the printer prototype to use when defining the printer.

For a valid list of prototypes or model descriptions, you can look in the SAS Registry Editor under CORE\PRINTING\PROTOTYPES.

Restriction: MODEL is limited to 127 characters.
Tip: While in interactive mode, you can invoke the registry with the REGEDIT command.
Tip: While in interactive mode, you can invoke the Print Setup dialog box (DMPRTSETUP) and press New to view the list that is specified in the second window of the Printer Definition wizard.
NAME

specifies the printer definition name that is associated with the rest of the attributes in the printer definition.

The name is unique within a given registry. If a new printer definition contains a name that already exists, then the record is not processed unless the REPLACE option has been specified or unless the value of the OPCODE variable is Modify.

Restriction: NAME must have the following features:
  • It is limited to 127 characters.

  • It must have at least one nonblank character.

  • It cannot contain a backslash.

Note:   Leading and trailing blanks will be stripped from the name.  [cautionend]


Optional Variables

The following variables are optional in the input data set:

BOTTOM

specifies the default bottom margin in the units that are specified by the UNITS variable.

CHARSET

specifies the default font character set.

Restriction: The value must be one of the character set names in the typeface that is specified by the TYPEFACE variable.
Restriction: CHARSET is limited to 31 characters.
DESC

specifies the description of the printer.

Default: DESC defaults to the prototype that is used to create the printer.
Restriction: The description can have a maximum of 1023 characters.
FONTSIZE

specifies the point size of the default font.

HOSTOPT

specifies any host options for the output destination. The host options are not case sensitive.

Restriction: The host options can have a maximum of 1023 characters.
LEFT

specifies the default left margin in the units that are specified by the UNITS variable.

LRECL

specifies the buffer size or record length to use when sending output to the printer.

Default: If LRECL is less than zero when modifying an existing printer, the printer's buffer size is reset to the size that is specified by the printer prototype.
OPCODE

is a character variable that specifies what action (Add, Delete, or Modify) to perform on the printer definition.

Add

creates a new printer definition in the registry. If the REPLACE option has been specified, then this operation will also modify an existing printer definition.

Delete

removes an existing printer definition from the registry.

Restriction: This operation requires only the NAME variable to be defined. The other variables are ignored.
Modify

changes an existing printer definition in the registry or adds a new one.

Restriction: OPTCODE is limited to eight characters.
Tip: If a user modifies and saves new attributes on a printer in the SASHELP library, then these modifications are stored in the SASUSER library. Values that are specified by the user will override values that are set by the administrator, but they will not replace them.
PAPERIN

specifies the default paper source or input tray.

Restriction: The value of PAPERIN must be one of the paper source names in the printer prototype that is specified by the MODEL variable.
Restriction: PAPERIN is limited to 31 characters.
PAPEROUT

specifies the default paper destination or output tray.

Restriction: The value of PAPEROUT must be one of the paper destination names in the printer prototype that is specified by the MODEL variable.
Restriction: PAPEROUT is limited to 31 characters.
PAPERSIZ

specifies the default paper source or input tray.

Restriction: The value of PAPERSIZ must be one of the paper size names listed in the printer prototype that is specified by the MODEL variable.
Restriction: PAPERSIZ is limited to 31 characters.
PAPERTYP

specifies the default paper type.

Restriction: The value of PAPERTYP must be one of the paper source names listed in the printer prototype that is specified by the MODEL variable.
Restriction: PAPERTYP is limited to 31 characters.
PREVIEW

specifies the printer application to use for print preview.

Restriction: PREVIEW is limited to 127 characters.
PROTOCOL

specifies the I/O protocol to use when sending output to the printer.

Operating Environment Information:   On mainframe systems, the protocol describes how to convert the output to a format that can be processed by a protocol converter that connects the mainframe to an ASCII device.  [cautionend]

Restriction: PROTOCOL is limited to 31 characters.
RES

specifies the default printer resolution.

Restriction: The value of RES must be one of the resolution values available to the printer prototype that is specified by the MODEL variable.
Restriction: RES is limited to 31 characters.
RIGHT

specifies the default right margin in the units that are specified by the UNITS variable.

STYLE

specifies the default font style.

Restriction: The value of STYLE must be one of the styles available to the typeface that is specified by the TYPEFACE variable.
Restriction: STYLE is limited to 31 characters.
TOP

specifies the default top margin in the units that are specified by the UNITS variable.

TRANTAB

specifies which translation table to use when sending output to the printer.

Operating Environment Information:   The translation table is needed when an EBCDIC host sends data to an ASCII device.  [cautionend]

Restriction: TRANTAB is limited to eight characters.
TYPEFACE

specifies the typeface of the default font.

Restriction: The typeface must be one of the typeface names available to the printer prototype that is specified by the MODEL variable.
Restriction: TYPEFACE is limited to 63 characters.
UNITS

specifies the units CM or IN that are used by margin variables.

VIEWER

specifies the host system command that is to be used during print previews. As a result, PROC PRTDEF causes a preview printer to be created.

Preview printers are specialized printers that are used to display printer output on the screen before printing.

Restriction: VIEWER is limited to 127 characters.
Tip: The values of the PREVIEW, PROTOCOL, DEST, and HOSTOPT variables are ignored when a value for VIEWER has been specified. Place %s where the input filename would normally be in the viewer command. The %s can be used as many times as needed.
WEIGHT

specifies the default font weight.

Restriction: The value must be one of the valid weights for the typeface that is specified by the TYPEFACE variable.

Previous Page | Next Page | Top of Page