Considerations for making norent programs reentrant.

0 pts.
Tags:
COBOL
We are migrating from OS/VS COBOL Release 2.4 to enterprise COBOL Rel 3. All the programs in OS/VS Cobol were compiled using NORENT option. After migration we would like the programs compiled with enterprise cobol to run above the line. Can you let us know what changes or considerations if any do we need to make in order to make OS/VS Cobol pgms reentrant.
ASKED: March 10, 2005  8:38 PM
UPDATED: March 14, 2005  4:59 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use AMODE(31),RMODE(ANY) to allow your programs to run above the line.
Re-entrant programs stay in memory after they are called the first time (to eliminate load time for the second and subsequent calls). As a result, working storage variables have te be re-initialized (by the program) at the beginning of each call.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mrmullins
    In general, you don't have to make changes in the programs - the compiler will do all the work. However, there may be some issues as far as environment goes, especially with program behavior as noted above. You don't mention a couple of important factors - are these batch or CICS programs, for example. If you could give us more information about this, then you will receive more complete answers.
    0 pointsBadges:
    report
  • Panky58
    We are migrating batch as well as CICS pgms. Right now our batch programs are compiled using NORENT compiler option. For batch programs if we want to make them reentrant what all considerations we need to make. Also what are the advantages of making batch pgm reentrant.
    0 pointsBadges:
    report
  • Luisalcibar
    You will not have probably problems from a "system programmer point of view", but the programs "must" be prepared to be reentrant, because with your older compilation option, they expect the working-storage in a "first state" mode ( that is, with all variable in initial state ), if you change the option, there is a risk that a variable is in a "last execution state" . For example a counter to read an internal table, will have the last value from the last execution, and if the application program don't initialize the counter, it will lead to a program error (0c7, 0c4,...) or even worst, it will run OK with unexpected results ( think about fields that contain money sale, and so on...). You can avoid it with the ININIAL clause in the IDENTIFICATIN( read the COBOL manual), but be CAREFUL with this option, because it has a performance overhead (there is a manual about COBOL performance questions in the IBM site ) Finally, i'm not sure, but i think this option is no possible for a CICS program. HTH
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following