The batch control event status conditions are used to determine the occurrence of runtime events specific to batch input. Batch control event status conditions can be used only in the batch environment.
At the beginning of application execution, the batch control event status conditions are initialized and the outcome of each test is false.
Syntax for the batch control event status conditions is shown below:
►►──┬─┬─ $END-OF-FILE ─┬─┬────────────────────────────────────────────────────►◄ │ └─ $EOF ─────────┘ │ └─── $IOERRor ───────┘
Tests whether the most recent input file read operation resulted in an end-of-file condition.
Tests whether the most recent input file read operation resulted in a physical input error. Note that a physical error on a write operation causes the application to abort.
Example
In the example below, execution of a set of commands continues until an end-of-file condition occurs:
WHILE NOT $EOF
REPEAT.
.
.
.
WRITE TRANSACTION.
END.
LEAVE APPLICATION.
|
Copyright © 2013 CA.
All rights reserved.
|
|