Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

ENDPAGE condition

Status
ENDPAGE is always enabled.
Result
When ENDPAGE is raised, the current line number is one greater than that specified by the PAGESIZE option (default is 60) so that it is possible to continue writing on the same page. The ON-unit can start a new page by execution of a PAGE option or a PAGE format item, which sets the current line to one.

If the ON-unit does not start a new page, the current line number can increase indefinitely. If a subsequent LINE option or LINE format item specifies a line number that is less than or equal to the current line number, ENDPAGE is not raised, but a new page is started with the current line set to one. An exception is that if the current line number is equal to the specified line number, and the file is positioned on column one of the line, ENDPAGE is not raised.

If ENDPAGE is raised during data transmission, on return from the ON-unit, the data is written on the current line, which might have been changed by the ON-unit. If ENDPAGE results from a LINE or SKIP option, on return from the ON-unit, the action specified by LINE or SKIP is ignored.

Cause and syntax
The ENDPAGE input/output condition is raised when a PUT statement results in an attempt to start a new line beyond the limit specified for the current page. This limit can be specified by the PAGESIZE option in an OPEN statement; if PAGESIZE has not been specified, a default limit of 60 is applied. The attempt to exceed the limit can be made during data transmission (including associated format items, if the PUT statement is edit-directed), by the LINE option, or by the SKIP option. ENDPAGE can also be raised by a LINE option or LINE format item that specified a line number less than the current line number. ENDPAGE is raised only once per page, except when it is raised by the SIGNAL statement.
Read syntax diagramSkip visual syntax diagram>>-ENDPAGE--(file-reference)-----------------------------------><
 

The file-reference must be a scalar reference.

Implicit action
A new page is started. If the condition is signalled, execution is unaffected and continues with the statement following the SIGNAL statement.
Normal return
Execution of the PUT statement continues in the manner described above.
Condition code
90

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)