Thank you Peter.
I missed your post yesterday morning as well as some others.
I am beginning to think that there was delay in the email yesterday morning and 
the msgs were delivered later in the
Day so I did not notice the earlier ones.

Option #1 sounds simpler than 2 since it does not require any code changes.


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Farley, Peter x23353
Sent: Tuesday, July 12, 2011 11:32 AM
To: [email protected]
Subject: Re: running Assembler I/O macro code as AMODE 31, RMODE ANY

Option #1: Use COBOL dynamic CALL (CALL variable-name-containing-module-name) 
to invoke the assembler modules and compile with DATA(24) so that the data 
areas in WORKING-STORAGE are below the line.  Link COBOL as RMODE=ANY and 
AMODE=31.

Option #2: Also uses dynamic COBOL call but compiled with DATA(31).  Use LE 
callable storage subroutines (CEEGTST, CEEFRST) to obtain below-the-line 
storage for data areas to be passed to the assembler subroutines.  Define the 
24-bit data areas in the LINKAGE section, not WORKING-STORAGWE, and use SET 
ADDRESS OF 24-bit-data-area TO pointer-returned-by-LE to address those data 
areas.  Move data from 31-bit WORKING-STORAGE to the LINKAGE-defined 24-bit 
areas to pass to the subroutines.

HTH

Peter

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Barkow, Eileen
> Sent: Tuesday, July 12, 2011 11:06 AM
> To: [email protected]
> Subject: running Assembler I/O macro code as AMODE 31, RMODE ANY
> 
> We have some old Cobol programs that are being upgraded to Enterprise
> Cobol and the users would like to be able to link them as AMODE 31 RMODE
> ANY. The problem is that some of these programs call assembler modules to
> do the i/o via QSAM and VSAM macros (TESTCB, SHOWCB, GET, PUT, PUTX, etc)
> and the only way these can work is by linking everything as AMODE 24,
> RMODE BELOW.
> 
> Is there any way (like by using LE enabled Assembler), that the assembler
> macro code can run AMODE 31, RMODE ANY? I know that one way is to reset
> the mode dynamically via BSM and other mode setting instructions so that
> the data areas can be moved to 24 bit areas before the macros are issued
> and then moving them back to AMODE 31 areas to be passed back to the Cobol
> programs. But is there a simpler way to do this?
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to