000001 Identification Division.
000002 Program-ID. testantlr147.
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 'testantlr147'.
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     >>IF F DEFINED
000025     >>IF C = 5
000026     CALL PGM-0001
000027     >>ELSE
000028     CALL PGM-0009
000029     >>END-IF
000030     >>ELSE
000031     >>IF D = 6
000032     CALL PGM-0002
000033     >>ELSE
000034     CALL PGM-0009
000035     >>END-IF
000036
000037     >>IF E = 4
000038     CALL PGM-0003
000039     >>ELSE
000040     CALL PGM-0009
000041     >>END-IF
000042     >>END-IF
000043
000044     DISPLAY MYNAME ' End'
000045     
000046     GOBACK
000047     .
000048
000049
