ENDPAGE (End Page) keyword in printer files
You use this record-level keyword to eject the current page after the record is printed.
This keyword has no parameters.
Specify DEVTYPE(*AFPDS) on the CRTPRTF command when ENDPAGE 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.
An error message is issued if a constant field is specified in a record format where the ENDPAGE keyword is also specified.
SPACEA
SPACEB
SKIPA
SKIPB
Option indicators are valid for this keyword.
Example
The following example shows how to specify the ENDPAGE keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A*
A R REC1 ENDPAGE
A FLD1 5A 66 10
A*
A R REC2
A 01 ENDPAGE
A FLD1 5A POSITION(8.5 10.2)
A
A page eject always occurs after REC1 prints.
If indicator 01 is on when the application writes REC2, a page eject occurs after REC2 prints. If indicator 01 is off when the application writes REC2, no page eject occurs.