HTBasic Help
×
Menu
Index

ON EOR

Defines an event branch for end-of-record conditions.
 
 ON EOR @io-path [,priority] action
 
Usage:
ON EOR @Dev GOTO 1200
ON EOR @Code,2 CALL Record
 
Description:
TRANSFER can define what is to be considered a record for the purpose of that particular TRANSFER. When an end-of-record is detected, an EOR event occurs which may be caught by the ON EOR statement. The ON EOR statement must be executed before the end-of-record condition occurs.
 
The I/O path must be the I/O path used in the TRANSFER to specify the device. Using the I/O path assigned to the buffer will cause an error.
If another ON EOR is executed in a different program context, the original ON EOR definition is restored when control returns to the calling context.
 
ON EOR is canceled by OFF EOR and is disabled by DISABLE. A SUBEXIT, SUBEND, or RETURN from the defining subprogram also cancels it. If a context exit is delayed until a TRANSFER terminates, any EOR events generated during the delay are discarded. Use WAIT FOR EOR to force the event to be serviced before the subprogram exits.
 
More information about ON EOR can be found under the "Common Information" heading of the ON CYCLE manual entry.
 
See Also: