Brian, I disagree with regards to the execution speed issue. Use of reentrant coding techniques require all instances executing the code to use their own work areas. This means that memory management macros (GETMAIN, FREEMAIN, STORAGE etc.) must be used.
In contrast a non-reentrant program can use a storage area assigned within the program code, thus dispensing with the overhead of using those system services. Lennie -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Brian Westerman Sent: 24 August 2024 07:53 To: [email protected] Subject: Re: Non-reentrant program not allowed (where?); Advantages of reentrant programs? Regardless of what anyone may have told you, a re-entrant program does NOT have to reside in LPA, it can reside in any load library you want. There is nothing inherently faster about the code that executes with being re-entrant for a general program. It does force you to use better coding techniques, and also it does allow you to put it in LPA (someday) if you decide to do so, but that would depend more on how often it will be used (cut down on the loads), rather than anything else. If you write a program that gets loaded 300,000 times a day, then it should be in linklist or LPAlib anyway if you can, to cut down on the overhead of loading the program into storage. If you are going to write complex programs, (main module with multiple|many sub-modules), then re-entrant is a good idea as well. As for execution speed, there is no real difference, once the program starts, code is code. Personally I try to always write re-entrant code, but that's probably because I write a lot of exits, and it's a requirement for (most of) them to be re-entrant. Brian ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
