Page 1 of 1

Re-entrant programs.

Posted: Tue Apr 05, 2016 2:00 pm
by Salil
Hi,

In CICS we have the concept of re-entrant programs. Can we do this for a COBOL batch programs too?

Re: Re-entrant programs.

Posted: Tue Apr 05, 2016 5:39 pm
by Robert Sample
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.

Posted: Thu Apr 14, 2016 4:46 pm
by Salil
Thanks Robert. But for other programs, like batch programs, why there is a need of being re-entrant?

Re: Re-entrant programs.

Posted: Thu Apr 14, 2016 7:25 pm
by Robert Sample
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.

Posted: Thu Apr 28, 2016 11:05 am
by Salil
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.
Thanks. Out of these examples, can such IMS program be application programs or you mean system level IMS programs?
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?

Re: Re-entrant programs.

Posted: Thu Apr 28, 2016 4:43 pm
by Robert Sample
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.

Re: Re-entrant programs.

Posted: Fri Apr 29, 2016 12:38 pm
by Salil
Thanks, that clears it up.