Hi John, To make my "desire" clearer, I'm going to slightly simplify my goal. I want to be able to bind as re-entrant any COBOL program that does NOT call an assembler subroutine that is not re-entrant.
If I add only REUS=RENT to by COBOL program binder JCL I get the following if the COBOL program does a static call to a non-reentrant assembler module: z/OS V1 R12 BINDER 10:34:27 MONDAY JULY 23, 2012 BATCH EMULATOR JOB(DVFJSCM ) STEP(STEP01 ) PGM= IEWL PROCEDURE(LKED ) IEW2278I B352 INVOCATION PARAMETERS - LIST,MAP,XREF,REUS=RENT IEW2609W 5104 SECTION SUBR USABILITY ATTRIBUTE OF NON-REUSABLE CONFLICTS WITH REQUESTED USABILITY OF REENTRANT.[...]SECTION CLASS ------- SOURCE -------- OFFSET OFFSET NAME TYPE LENGTH DDNAME SEQ MEMBER 0 RUNDATE CSECT F9C SYSLIN 01 **NULL** FA0 CEESG005 * CSECT 18 SYSLIB 07 CEESG005 FB8 CEELOCT * CSECT 14 SYSLIB 07 CEELOCT FD0 SUBR * CSECT CFC SYSLIB 01 SUBR [...] PROCESSING OPTIONS: [...] COMPAT UNSPECIFIED [...] RES NO REUSABILITY REENTRANT [...]SAVE MODULE ATTRIBUTES: [...] AMODE 31 [...] REFR NO RENT YES REUS YES RMODE ANY [...] MESSAGE SUMMARY REPORT ---------------------- WARNING MESSAGES (SEVERITY = 04) 2609 INFORMATIONAL MESSAGES (SEVERITY = 00) 2008 2278 As you say, this will not work well if the program is loaded in to read-only storage. z/OS V1 R12 BINDER 10:38:20 MONDAY JULY 23, 2012 BATCH EMULATOR JOB(DVFJSCM ) STEP(STEP01 ) PGM= IEWL PROCEDURE(LKED ) IEW2278I B352 INVOCATION PARAMETERS - LIST,MAP,XREF,COMPAT=LKED,REUS=RENT IEW2664I 5143 SECTION SUBR USABILITY ATTRIBUTE OF NON-REUSABLE CONFLICTS WITH REQUESTED USABILITY OF REENTRANT. [...] PROCESSING OPTIONS: [...] COMPAT LKED [...] RES NO REUSABILITY REENTRANT [...] SAVE MODULE ATTRIBUTES: AMODE 31 [...] REFR NO RENT NO REUS NO RMODE ANY [...] MESSAGE SUMMARY REPORT ---------------------- [...] WARNING MESSAGES (SEVERITY = 04) NONE INFORMATIONAL MESSAGES (SEVERITY = 00) 2008 2278 2664 Differences when COMPAT=LKED specified: IEW2664I instead of IEW2609W. RENT NO instead of RENT YES (even though REUS=RENT specified). REUS NO instead of REUS YES (even though REUS=RENT specified). Doing this (specifying COMPAT=LKED) works fine and allows me to change the REUS option on my COBOL program binds to REUS=RENT, but to not have non-reentrant programs erroneously specified as being RENT when in fact they are not. This gives me time to make the assembler subroutines re-entrant at my convenience, while still being able to make those COBOL routines that do not call NORENT modules re-entrant sooner rather than later. I just want to make sure I'm not "missing" something or losing out on some benefit by doing this. I guess one point to be made is that I don't want to have to specify REUS=RENT on a program by program basis for those modules that I want to bind as reentrant. By doing this I can change the COBOL binder step to always specify this option (and COMPAT=LKED), and it will set RENT/REUS when those options are set in all routines bound together; otherwise it will not sent RENT/REUS. Finally, I am indeed making the assembler subroutines LE-compatible. As you say, it makes the storage management much simpler; especially when the same module can be executed both under CICS and not under CICS. Thanks! Frank >________________________________ > From: John Gilmore <jwgli...@gmail.com> >To: IBM-MAIN@LISTSERV.UA.EDU >Sent: Sunday, July 22, 2012 7:12 AM >Subject: Re: re-entrant modules and the binder > >I am not sure that I fully understand exactly what you want to do or >the exact sequence in which you want to do it. > >Your objective is, however, clear: You want to be able to use the CICS >RENTPGM=PROTECT facility. If 1) you specify this option for a CICS >application program (AP) and 2) CICS honors it, that AP is placed in >read-only storage. > >A later attempt to execute such an AP will have dire consequences if >it in fact modifies itself. You may not therefore specify this option >for a load module or program object that contains a non-reentrant >assembly-language module or modules. > >As you have noted, there is no great difficulty about making your >COBOL modules reentrant. Instructing your compiler to do so will >accomplish this. > >Specifying the RENT option when you assemble your HLASM subroutines >instructs the HLASM to check your code for non-reentrant constructs, >and it finds many but not quite all of them. (You can and should use >the &SYSOPT_RENT boolean within each assembly unit to ensure that the >RENT option has in fact been specified for it.) > >I strongly recommend that you also make these assembly-language >modules LE-compatible. Using the LE's LIFO storage-management >facilities will make the task of making these modules reentrant much >easier. > >John Gilmore, Ashland, MA 01721 - USA > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN