PAGSEG (Page Segment) Keyword in Printer Files

Use this record-level keyword to print a page segment.

The format of the keyword is:

PAGSEG(library-name | &library-name-field/ page-segment-name | &page-segment-name-field
position-down | &position-down-field
position-across | &positon-across-field
 [(*SIZE width | &width-field height | height-field)]
 [(*ROTATION rotation | &rotation)] 

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

Use the optional library-name parameter to further qualify the page segment. If you do not specify the library name, *LIBL is used to search for the page segment 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, page-segment-name, position-down, position-across, width, height 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 PAGSEG keyword. It must be defined as length of 10, data type A (character), and usage P (program-to-system).

When you specify the page-segment-name as a program-to-system field, the field must exist in the same record format as the PAGSEG 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, position-across, width, or height parameters as program-to-system fields, the fields must be defined as length 5 with 3 decimal positions, data type S, and usage P. Rotation must be defined as length with 3 and 0 decimal points, data type S and usage P.

The position-down parameter defines the vertical starting point of the page segment 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 page segment 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 page segment does not fit on the page.

Use the optional width and height parameters to specify the size of the page segment. They are specified as an expression of the form (*SIZE width height). If these parameters are omitted, then the size of the page segment will not be changed (the page segment will print with the size it was originally created with).

The optional width parameter defines the width of the page segment. Valid values are 0.001 to 57.790 cm (0.001 to 22.750 in.). If the width is specified, then the height parameter must also be specified.

The optional height parameter defines the height of the page segment. Valid values are 0.001 to 57.790 cm (0.001 to 22.750 in.). If the height is specified, then the width parameter must also be specified.

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

Note:
If the rotation parameter is omitted, then page segments are not automatically rotated when using the PAGRTT parameter on the printer file. Feature PSF/400 is required for use of this keyword.

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when PAGSEG 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 PAGSEG 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 PAGSEG keyword is also specified.

You can specify the PAGSEG keyword multiple times on a record.

A maximum of 10 page segments can be used per page.

Page segments 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 page segments and rotation.

You cannot specify PAGSEG at the same level as 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.