In any case( code A or CODE B) only one condition will be true at a time.Right!!.So it will look for an END-IF of the satisfied IF condition which IS TRUE.Like if CASE=1,it will "PERFORM X" and come out of the loop looking for END-IF.
So even if you give one END-IF instead of three,there won`t be any problem as ur CODE B suggests.
I don't have access to a CPU but I'd say that code B won't compile unless perhaps it's terminated by a period.
Putting the IF on the same line as the ELSE doesn't change the code presented in code A. With the exception of the missing END-IFs they are identical. COBOL "squeezes" out the extra spaces during interpretation.
here the answer is correct but eventhough the compiler give the error.because for every if construct corresponding end-if has to be there.
so i think it will be error .compulsary there will be three end-ifs has to be there.....