× 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 isn't quite as simple as RPG David because COBOL has a thing called the run unit (kinda like the Activation Group).

In the simplest of terms a STOP RUN will terminate the program. A GO BACK or EXIT PROGRAM will keep it active. Actually instead of "will" I should say "may" because there is a bit of "it depends" in there. And I can't say more that that because you have failed to give us one vital piece of information.

Is it COBOL/400 or ILE COBOL. If ILE COBOL what activation group. It is also important to know if it is the first COBOL program in a series or one later in the chain.

On 2013-06-28, at 2:02 PM, David Gibbs <david@xxxxxxxxxxxx> wrote:

Fair warning ... I haven't seriously looked at COBOL since I was in college ... some 30+ years ago.

I've got a customer problem where a COBOL program is remaining active even after it's been exited. Even though the program has been replaced (and the original program moved to a different library), when they re-run the program, the moved program object goes active.

In RPG we would shut down a program by setting on LR and exiting the program.

If we want to keep the program active, we would NOT set LR on and exit.

How would you exit a program normally in COBOL ... and how would you exit the program but leave the program active?



IBM i on Power Systems - For when you can't afford to be out of business

Thanks to all who sponsored me in the 2013 Chicago Tour de Cure.
This is the COBOL Programming on the IBM i (AS/400 and iSeries) (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.

Jon Paris


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.