Hi,
First of all, let me admit that its been a long time since I have written a plain COBOL call.
However I still do remember the syntax and everything, so when this happened it really puzzled me.
I have written a new COBOL Batch Module, lets say PROGA
PROGA is calling PROGB as follows:
The thing is PROGB has not even been written till now.
So I expected the program to fail here, but it went ahead without doing anything to the next statements.
What I fopun even stranger was that when I removed the On exception condition, The program did abend as expected saying that the module PROGB is not found.
What is that I am overlooking for the ON exception condition not getting executed?
First of all, let me admit that its been a long time since I have written a plain COBOL call.
However I still do remember the syntax and everything, so when this happened it really puzzled me.
I have written a new COBOL Batch Module, lets say PROGA
PROGA is calling PROGB as follows:
Code:
Call PROGB using inPROGB outPROGB
on exception
move 'Fejl - Call PROGB' to logLocation
string 'Program ' PROGB ' not found'
delimited by size into logDescription
end-string
perform errorExit
end-call
The thing is PROGB has not even been written till now.
So I expected the program to fail here, but it went ahead without doing anything to the next statements.
What I fopun even stranger was that when I removed the On exception condition, The program did abend as expected saying that the module PROGB is not found.
Code:
Call PROGB using inPROGB outPROGB
end-call
What is that I am overlooking for the ON exception condition not getting executed?