000001 Identification Division.
000002 Program-ID. testantlr146.
000003 Data Division.
000004 Working-Storage Section.
000005
000006 >>DEFINE A 2
000007 >>DEFINE B 3
000008 >>DEFINE C A + B
000009 >>DEFINE D A * B
000010 >>DEFINE E (D * A) / 3
000011
000012 01  CONSTANTS.
000013     05  MYNAME               PIC X(012) VALUE 'testantlr146'.
000014     05  PGM-0001             PIC X(008) VALUE 'PGMA0001'.
000015     05  PGM-0002             PIC X(008) VALUE 'PGMA0002'.
000016     05  PGM-0003             PIC X(008) VALUE 'PGMA0003'.
000017     05  PGM-0009             PIC X(008) VALUE 'PGMA0009'.
000018
000019*
000020
000021 Procedure Division.
000022     DISPLAY MYNAME ' Begin'
000023
000024     >>EVALUATE TRUE
000025     >>WHEN C = 5
000026     CALL PGM-0001 USING
000027       MYNAME
000028     END-CALL
000029     >>WHEN D = 6
000030     CALL PGM-0002
000031       MYNAME
000032     END-CALL
000033     >>WHEN E = 4
000034     CALL PGM-0003
000035       MYNAME
000036     END-CALL
000037     >>WHEN OTHER
000038     CALL PGM-0009
000039       MYNAME
000040     END-CALL
000041     >>END-EVALUATE
000042
000043     DISPLAY MYNAME ' End'
000044     
000045     GOBACK
000046     .
000047
000048
