Re-entrant programs.
Re-entrant programs.
Hi,
In CICS we have the concept of re-entrant programs. Can we do this for a COBOL batch programs too?
In CICS we have the concept of re-entrant programs. Can we do this for a COBOL batch programs too?
- Robert Sample
- Global Moderator
- Posts: 1891
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Re-entrant programs.
Yes, in fact certain programs must be compiled re-entrant. Find the compiler option RENT in the Enterprise COBOL Programming Guide manual for more information.
Re: Re-entrant programs.
Thanks Robert. But for other programs, like batch programs, why there is a need of being re-entrant?
- Robert Sample
- Global Moderator
- Posts: 1891
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Re-entrant programs.
Batch programs need to be re-entrant if they are pre-loaded in IMS, if they run under Unix System Services, if they are DB2 stored procedures, if they need DLL support or use object-oriented syntax. Otherwise, they can be re-entrant or not. Also, programs compiled with NORENT must be RMODE 24 so they must be loaded below the line.
Re: Re-entrant programs.
Thanks. Out of these examples, can such IMS program be application programs or you mean system level IMS programs?Robert Sample wrote:Batch programs need to be re-entrant if they are pre-loaded in IMS, if they run under Unix System Services, if they are DB2 stored procedures, if they need DLL support or use object-oriented syntax. Otherwise, they can be re-entrant or not. Also, programs compiled with NORENT must be RMODE 24 so they must be loaded below the line.
Why should they be RMODE 24? Will not that cause problem for programs which are AMODE/RMODE=31... can not that be a restriction for application development?
- Robert Sample
- Global Moderator
- Posts: 1891
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Re-entrant programs.
I assume IMS would be system and application. And I think you're reading what I said wrong: if the program is NORENT it must reside below the line. This does NOT say nor imply that RENT programs must be above the line. But yes if there are RMODE 24 and 31 programs in an application, abends can occur.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute