Previous Topic: Status ConditionsNext Topic: Environment Status Conditions


Batch Control Event Status Conditions

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 ───────┘
$END-OF-FILE

Tests whether the most recent input file read operation resulted in an end-of-file condition.

$IOERROR

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.