Good afternoon, I am analyzing some legacy code in COBOL and have found this case specific case that I can't wrap my head around.
000610 IF EIBCALEN = 0 00061011
000700 EXEC CICS 00070000
000800 SEND MAP('TCHM144') 00080007
001100 END-EXEC. 00110000
001110 ELSE 00111013
001111 IF EIBAID = DFHCLEAR OR DFHPF2 OR DFHPF3 00111113
001112 EXEC CICS SEND FROM(WS-CHAR) 00111213
001113 LENGTH(LENGTH OF WS-CHAR) 00111313
001114 ERASE 00111413
001115 END-EXEC. 00111513
001116 EXEC CICS RETURN END-EXEC. 00111613
001120* MAPONLY ERASE FREEKB 00112002
001200 EXEC CICS 00120000
001300 RETURN TRANSID('TCE4') 00130000
001400 END-EXEC. 00140000
001500 GOBACK. 00150012
From what I recall having a period in the body of the IF statement closes the sentence up to the IF at the highest level but, in this case the END-EXEC contained in the IF's body is followed by a period which, following the above mentioned logic would close the sentence and the ELSE would not be referred to any IF. Am I correct or is there a specific case where this would work? Thank you.