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.

Note:
If an application uses private resources (for example, fonts, page segments, overlays, or GDF files not distributed with the system), be aware of the following. When referencing these resources, if you specify *LIBL or you do not specify a library name, the resources must be available through the library list used by the application creating the spooled file.

You can specify the library-name, overlay-name, position-down, position-across, and rotation parameters as constants, program-to-system fields, or a combination of both, as shown in the following:

When you specify the library-name as a program-to-system field, the field must exist in the same record format as the OVERLAY keyword. It must be defined as length of 10, data type A (character), and usage P (program-to-system).

When you specify the overlay-name as a program-to-system field, the field must exist in the same record format as the OVERLAY keyword. It must be defined as length of 8, data type A (character), and usage P (program-to-system).

When you specify the position-down or position-across as program-to-system fields, the fields must be defined as length 5 with 3 decimal positions, data type S, and usage P. A program-to-system field for rotation must be defined as length 3 with 0 decimal positions, data type S and usage P.

The position-down parameter defines the vertical starting point of the overlay relative to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).

The position-across parameter defines the horizontal starting point of the overlay relative to the margins specified on the FRONTMGN or BACKMGN parameter on the CRTPRTF command. Valid values are 0 to 57.790 cm (0 to 22.750 in.).

Note:
The UOM parameter on the CRTPRTF command determines the units of measure for the position-down and position-across parameter values. If the value specified for a parameter is outside the valid range, it is flagged when the spooled file is created.

An error message is issued at print time if the overlay does not fit on the page.

The optional rotation parameter allows you to specify a rotation value for the overlay. Valid values are 0, 90, 180 and 270. It is specified as an expression of the form (*ROTATION rotation).

Note:
If the rotation parameter is omitted, then overlays are not automatically rotated when using the PAGRTT parameter on the printer file. See the Printer Device Programming book for information on overlays and rotation.

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when OVERLAY is specified in the file. If DEVTYPE is changed to anything other than *AFPDS, the keyword is ignored and a warning message is issued at print time.

When the OVERLAY keyword is specified on a record format, all fields within the record format must be positioned using the POSITION keyword. See POSITION (Position) Keyword in Printer Files for more information.

An error message is issued if a constant field is specified in a record format where the OVERLAY keyword is also specified.

You can specify this keyword multiple times on a record.

A maximum of 10 overlays can be used on a single page.

Overlays are not automatically rotated when using the PAGRTT keyword or the PAGRTT parameter on the printer file. See the Printer Device Programming book for information on overlays and rotation.

You cannot specify OVERLAY with the following keywords:

SPACEA

SPACEB

SKIPA

SKIPB

Note:
Feature PSF/400 is required for use of this keyword. If PSF/400 is not installed, you will not be able to print files using this keyword and specifying DEVTYPE(*AFPDS).

Option indicators are valid for this keyword.