You are on page 1of 3

Defining a Printer File

Specify the entries in the following order to define a printer file:


1. File-level entries (optional)
2. Record-level entries
3. Field-level entries

ALIAS (Alternative Name) Keyword in Printer Files

Use this field-level keyword to specify an alternative name for a field. When the
program is compiled, the alternative name is brought into the program instead of
the DDS field name. The high-level language compiler in use determines if the
alternative name is used.

BARCODE (Bar Code) Keyword in Printer Files

Use this field-level keyword to print a field as a user-specified bar code.


BARCODE is valid only for Intelligent Printer Data Stream* (IPDS*) printers and
only for printer files with device type *IPDS or *AFPDS specified.
The format of the keyword is:
BARCODE(bar-code-ID [height] [[*HRZ | *VRT]
[*HRI | *HRITOP | *NOHRI] [*AST | *NOAST]
[check-digit] [unit-width]
[wide/narrow-ratio]])

BOX (Box) Keyword in Printer Files


Use this record-level keyword to print a rectangle.
The format of the keyword is:
BOX(first-corner-down | &first-corner-down-field
first-corner-across | &first-corner-across-field
diagonal-corner-down | &diagnonal-corner-down-field
diagonal-corner-across | &diagnonal-corner-across-field
line-width | &line-width-field);

The first-corner-down, first-corner-across, diagonal-corner-down, and


diagonal-corner-across parameters define the diagonal corners of the box. All are
required parameters.

DATE (Date) Keyword in Printer Files

Use this field-level keyword to display the current date or the current system date
as a constant field 6 or 8 bytes long. You can specify the location of the field, the
DATE keyword,

DATSEP (Date Separator) Keyword in Printer Files


Use this field-level keyword to specify the separator character for a date field. This
keyword is valid for only date fields (data type L).
The format of the keyword is:
DATSEP(*JOB | 'date-separator')

The date separator parameter specifies the separator character that appears
between the year, month, and day. Valid values are a slash (/), dash (), period (.),
comma (,) or blank ( ). Apostrophes must enclose the parameter.

ENDPAGE (End Page) Keyword in Printer Files


Use this record-level keyword to eject the current page after the record is printed.
This keyword has no parameters.
An error message is issued if a constant field is specified in a record format where

the ENDPAGE keyword is also specified.


You cannot specify ENDPAGE with the following keywords:
SPACEA
SPACEB
SKIPA
SKIPB

FONT (Font) Keyword in Printer Files

Use this record- or field-level keyword to specify the font ID for printing a named
or constant field or fields within a record.

INDARA (Indicator Area) Keyword in Printer Files

Use this file-level keyword to remove option indicators from the buffer (also called
the record area) and place them in a 99-byte separate indicator area.

LINE (Line) Keyword in Printer Files

Use this record-level keyword to print a horizontal or vertical line.


The format of the keyword is:
LINE(position-down | &position-down-field
position-across | &position-across-field
line-length | &line-length-field
line-direction
line-width | &line-width-field
[line-pad])

LPI (Lines Per Inch) Keyword in Printer Files


Use this record-level keyword to change lines per inch within a file. If you do not
specify LPI for a record, the LPI value is set from the LPI value on the CRTPRTF,
CHGPRTF, or OVRPRTF command.
The format of the keyword is:
LPI( 4 | 6 | 8 | 9 | 12)

4, 6, 8, 9, and 12 are the valid parameter values.

OVERLAY (Overlay) Keyword in Printer Files


Use this record-level keyword to print an overlay.
The format of the keyword is:

OVERLAY([(library-name | &library-name-field)/overlay-name] | &overlay-name-field]


position-down | &position-down-field
position-across | &position-across-field
[(*ROTATION rotation-field) | &rotation-field-name)])

The overlay-name, position-down, and position-across parameters are required.


Use the optional library-name parameter to further qualify the overlay. If you do
not specify the library-name parameter, *LIBL is used to search for the overlay at print time.

PAGNBR (Page Number) Keyword in Printer Files


Use this field-level keyword to specify the location of an unnamed, 4-digit, zoned
decimal field to contain the page number. Specify only the PAGNBR keyword, the
location of the field (the location of the field can be either position only, or line
number and position), and, optionally, the CHRSIZ, COLOR, FONT, HIGHLIGHT,
UNDERLINE, or TEXT keyword. This keyword has no parameters.

POSITION (Position) Keyword in Printer Files

Use this field-level keyword to define the location of a named field on the page.
The format of the keyword is:
POSITION(position-down | &position-down-field
position-across | &position-across-field)

SKIPA (Skip After) Keyword in Printer Files

Use this file-, record-, or field-level keyword to specify that the printer device is to
skip to a specific line number after it prints one or more lines.
The format of the keyword is:
SKIPA(skip-after-line-number)

The parameter value is required and must be in the range 1 through 255.
If you specify the keyword at the file level, you must option it with one or more
indicators. If you specify the keyword at the record or field level, option indicators
are optional. The specified skip is performed after each record in the file prints.
If you specify the keyword at the record level, skipping is performed after all the
lines associated with the record print and before any file-level SKIPA keywords are applied.
If you specify the keyword at the field level, skipping is performed after the field prints.

SPACEA (Space After) Keyword in Printer Files

Use this record- or field-level keyword to specify that the printer device is to space
some number of lines after it prints one or more lines.
The format of the keyword is:
SPACEA(space-after-value)

The parameter value is required and must be in the range 0 through 255.
If you specify this keyword at the record level, spacing occurs after all lines
associated with that record are printed. You can specify this keyword only once at
the record level and once for each field.
If you specify SPACEA at the field level, spacing is performed after the field is
printed. This keyword is not valid for records with specified line numbers

Message Subfile Using DDS

The following keywords are important


SFLMSGKEY
SFLPGMQ
SFLMSGRCD
Records in the subfile are messages from a message file.

You might also like