Exit Program for a Customized Separator Page


  Required Parameter Group:


  QSYSINC Member Name: ESPBLSEP

An exit program can be specified on the separator program parameter of the printer device description. If a separator exit program is specified on the printer device description, the system printer writer calls this program to create the separator page. This separator page is used instead of the system separator page.


Authorities and Locks

None.


Required Parameter Group

Separator data
OUTPUT; CHAR(*)

The separator data consists of two parts:

  • Options that control how the separator data is to be printed
  • User-generated separator data

See the Separator Data Format for more information.

Separator data length
INPUT; BINARY(4)

The length of the space used to pass separator data from the exit program.

Separator information
INPUT; CHAR(*)

Information that may be used to generate the separator data.

See the Separator Information Format for more information.

Separator information length
INPUT; BINARY(4)

The length of the space used to pass separator information to the exit program.

Separator Data Format

The following table shows the information passed from the exit program to create the customized separator page for the printer writer. The printer writer takes the information and data, and prints the separator page.

See Field Descriptions for more information.



Field Descriptions

Each field is only valid when the transform option field is specified as *FCFC. Otherwise, the field is ignored.

Characters per inch. The number of characters (in tenths) to be printed per inch.

The possible values are:

Any other value, or a value not supported by the particular printer, will result in 10 characters per inch.

DBCS character rotation. Whether double-byte character set (DBCS) characters are to be rotated 90 degrees counterclockwise before printing. The possible values are *YES and *NO. The default value is *NO.

DBCS characters per inch. The number of double-byte characters to be printed per inch.

The possible values are:

If any other value is used, the characters are printed at one-half of the characters-per-inch (*CPI) value.

Length of user-generated data. The number of bytes of data (contained in the user-generated separator data field) passed from the user exit program.

The length of the user-generated separator data cannot exceed 8096 bytes for printers configured AFP(*NO). A value greater than 8096 causes the system separator page to be printed.

Lines per inch. The number of lines (in tenths) to print per vertical inch.

The possible values are:

Any other value, or a value not supported by the particular printer, will result in 6 lines per inch.

This parameter is output from the exit program and is only valid when the Transform Option is specified as *FCFC. Otherwise this parameter is ignored.

Page length. The length of the separator page. The page length can be specified in inches, centimeters, or rows depending on the page size measurement method field.

A zero indicates the page length of the spooled file should be used. A nonzero page length value is valid only when the page width field is also set to a nonzero value. Otherwise, the page length is ignored.

Inches and centimeters are specified in 1/100ths. The value 1100 indicates a page length of 11 inches when the page size measurement method field is *INCH.

Page size measurement method. The measurement method used for the page length and page width fields.

The possible values are:

Page width. The width of the separator page. The page width can be specified in inches, centimeters, or rows depending on the page size measurement method field.

A 0 indicates the page width of the spooled file should be used. A nonzero page width value is valid only when the page length field is also set to a nonzero value. Otherwise, the page width is ignored.

Inches and centimeters are specified in 1/100ths. The value 850 indicates a page width of 8.5 inches when the page size measurement method field is *INCH.

Overlay library name. The name of the library containing the separator overlay.

The possible values are:

If no value is returned from the exit program, *LIBL is assumed.

Overlay name. The name of the separator overlay (the material that prints on the front side of each separator page).

The possible values are:

If no value is returned from the exit program, *NONE is assumed. Otherwise this parameter is ignored.

Page rotation. The degree of rotation of the text on the page, with respect to the way the form is loaded into the printer.

The possible values are:

If no valid value is returned from the exit program, 0 is assumed.

Print quality. The print quality that is used when printing the separator.

The possible values are:

If no valid value is returned from the exit program, *DEVD is assumed. Otherwise this parameter is ignored.

Record length of user data. The length of the *FCFC format records in the user-generated separator data field.

Reserved. An ignored field.

Transform option. Whether the user-generated data is to be transformed into commands recognized by the printer.

The possible values are:

For the printer data stream type field of *SCS and *IPDS, data stream commands controlling the drawer, rotations, and fonts may be sent to the printer before the user-generated data. This puts the printer in the same state as it is when system default separators are printed. The commands controlling the drawer are based on the SEPDRAWER parameter of the Start Printer Writer (STRPRTWTR) command. The remaining controls are set to defaults or have values set from the spooled file attributes of the spooled file that prints next.

For a printer data stream type of *AFPDS, the initial commands are not sent to the printer and the user must include all commands needed to define an AFPDS document.

User-generated separator data. The data that prints on the separator page. The format of this text is dependent on the transform option and the printer data stream type fields. When *FCFC has been specified for the transform option, the data must be in the *FCFC format. When *NONE is specified for the transform option, the data (text and controls) must be in the format specified by the printer data stream type field.

Separator Information Format

The following table shows the information passed from the printer writer to the exit program. This information is used to create a customized separator page. For more details about the fields in the following table, see Field Descriptions.



Field Descriptions

Internal job identifier. The internal identifier of the job that owns the spooled file that prints next. Only the IBM® i APIs use this identifier. The identifier is not valid following an initial program load (IPL). If you attempt to use it after an IPL, an exception occurs.

Internal spooled file identifier. The internal identifier of the spooled file that prints next. This value is used as input to other programs to improve the performance of locating the spooled file on the system. Only the IBM i APIs use this identifier. The identifier is not valid following an IPL. If you attempt to use it after an IPL, an exception occurs.

Job name. The name of the job that created the spooled file that prints next.

Job number. The number of the job that created the spooled file that prints next.

Job system name. The name of the system where the job that created the spooled file ran.

If the separator data length is less than 124 bytes, the exit program should assume *ONLY.

Printer device name. The name of the printer device description for the writer that was started.

Printer data stream type. The type of data stream recognized by the printer writer. When the transform option is specified as *NONE, this field must be used to determine the format of the user-generated separator data field.

The possible values are:

Reserved. An ignored field.

Spooled file create date. The date the spooled file was create on the system in the format CYYMMDD. See field Date file opened in API QUSRSPLA under field descriptions for more information on the date format.

If the separator data length is less than 124 bytes, the exit program should assume *ONLY.

Spooled file create time. The time the spooled file was created on the system in the format HHMMSS. See field Time file opened in API QUSRSPLA under field descriptions for more information on the time format.

If the separator data length is less than 124 bytes, the exit program should assume *ONLY.

Spooled file name. The name of the spooled file that prints next.

Spooled file number. The spooled file number of the spooled file that prints next.

Type of separator. The type of separator you want printed.

The possible values are:

User name. The name of the user that created the spooled file that prints next.



Exit program introduced: V2R3

[ Back to top | Print APIs | APIs by category ]