We are a very large mainframe shop and use Cobol extensively. We have both main program assembler and Asm subroutines.
We find that if you call a AMODE 24 subroutine dynamically, Cobol complains. I recommend that before STM 14,12 in subroutine, use the following so that you always return to the caller in the mode they called you BSM R14,0 *Save mode bit to use when exit -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Steve Thompson Sent: Monday, July 11, 2016 4:10 PM To: [email protected] Subject: COBOL CALLing ALC ... I am trying to determine how I am supposed to know if a COBOL program is AMODE=31/ANY when they call an ALC subroutine. The routine getting control has just been through an upgrade from 1979 style of NOREUS and data mixed in with instructions. Also, this routine is not LE conforming. It has never been. I'm used to doing a BSM to return as a subroutine to have addressing modes match. I had assumed that the caller did BSSM not just BASR or BALR So when the program ends and returns to the caller via BSM R14, wow, you would not believe all the ESTAEs that get driven (including this programs ESTAEX). LE throws a fit and thankfully, having set up SYSMDUMP with DISP=MOD, I get the dump I need and IPCS ignores the second dump. ;-) So, R14 does not have the hi-order bit on when I am called. COBOL being used is Enterprise COBOL 4.2 (which is currently supported). The environment, just so we are all on the same page is JES2, z/OS 2.2, z13EC. Regards, Steve Thompson PS. I have been scanning various manuals (including the LE one) and nothing is said about this. And I don't have any MVS/XA or MVS/ESA manuals around anymore. ----------------------------------------- The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. The information may also constitute a legally privileged confidential communication. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you
