× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It would certainly work. For myself if I was going to go in and make code changes I think I'd replace EXIT PROGRAM with a COPY. The COPY member would consist of an EXIT PROGRAM followed by an error routine that output a message before doing a STOP RUN or a GOBACK.

Call me old fashioned but if I'm expecting EXIT PROGRAM and I'm getting a STOP RUN (which is what GOBACK gives me) I like to know about it.

Don't get me wrong - I like GOBACK - but as an engineered solution. In the early days of mixing OPM and ILE I'd like to know a bit more about what is happening rather than just rely on default behaviors.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On 4-Nov-09, at 1:36 PM, Jeff Buening wrote:

Jon ,

Not using GOBACK to replace every STOP RUN makes sense, but would it
be correct to use GOBACK instead of EXIT PROGRAM just to take out the
chance of falling through the EXIT PROGRAM (unless you wanted to use AND
CONTINUE RUN UNIT)? I have noticed some of our sub programs use EXIT
PROGRAM in the middle of the program and can see issues if I leave like
that and start working with OPM ILE mix.





message: 3
date: Wed, 4 Nov 2009 08:14:49 +0100
from: <geir.kildal@xxxxxxxxxx>
subject: Re: [COBOL400-L] DFTACTGRP(*YES) vs ACTGRP(*Caller)

Hi.

Interesting discussion, this. I have programmed the same calls to ILE
pgms from OPM pgms as Jeff describes, without knowing what possible
traps I could run into.
But one question for you gents: Is there any reason for using STOP
RUN/EXIT PROGRAM when we have GOBACK, that will act as an EXIT PROGRAM
when detected in a called pgm, and as a STOP RUN if it is in a
'non-called' pgm?


Mvh.

Geir.

"Keep it simple!"




------------------------------

message: 4
date: Wed, 4 Nov 2009 10:01:56 -0500
from: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
subject: Re: [COBOL400-L] DFTACTGRP(*YES) vs ACTGRP(*Caller)

If you are in a mixed ILE OPM environment it can be "interesting"
because the system may not agree with you as to what is a subprogram.

You need to check your specific usage and make sure that you are
indeed getting a STOP RUN from it when you expect one. Also remember
that the STOP RUN will only tear down the ILE AG - not the OPM one.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com





--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.