Operating System - OpenVMS
1752796 Members
6148 Online
108789 Solutions
New Discussion юеВ

recursive activation of PERFORM -problem in Cobol

 
Hein van den Heuvel
Honored Contributor

Re: recursive activation of PERFORM -problem in Cobol

>> We have been ordered to use STOP RUN only in the end of the main prog, and to use EXIT PROGRAM in all modules below.

Please forward to "Dilbert". It's worthy.

In the light of my example above, do you still think that management edict is prudent and worth following?

Best regards,
Hein
Wim Van den Wyngaert
Honored Contributor

Re: recursive activation of PERFORM -problem in Cobol

Hein,

I think this is a subroutine. And then EXIT PROGRAM is ok. Only the master program must do STOP RUN.

Wim
Wim
Ari_k
Occasional Advisor

Re: recursive activation of PERFORM -problem in Cobol


Exactly, thanks Wim!
Hein van den Heuvel
Honored Contributor

Re: recursive activation of PERFORM -problem in Cobol

Drats. My physic powers must be on the wane.

Or maybe it is the fact the the word 'subroutine' was never used. Only comments like. "running of the program ", "I have examined the logic of the program".

But anyway, Absolutely, 'exit program' is just fine for a subroutine, and 'stop run' is rarely appropriate for a subroutine.

Cheers!

Hein.


Ari_k
Occasional Advisor

Re: recursive activation of PERFORM -problem in Cobol

Yeah, sorry about that... I was painfully aware that my terminology was substandard.

Anyway, I fixed the settings so that the code for subroutine in 620_GET_COSTOMER_INFO, just above the place where the errorcode happened, was linked from the right source and the sun was shining again.

Once again, thanks to everyone!