The following examples show how you can use level-88 items to test for various binary-valued (on-off) conditions in your program.
For example, to test for the end-of-file condition for an input file named Transaction-File, you can use the following data definitions:
05 Transaction-EOF-Switch Pic X value space.
88 Transaction-EOF value "y".
The level-88 description says that a condition named
Transaction-EOF is in effect when
value 'y'. Referencing
Transaction-EOF in the
DIVISION expresses the same condition as testing
= "y". For example, the following statement causes a report
to be printed only if
been set to 'y':
If Transaction-EOF Then