> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Ludmila Koganer
> Sent: Wednesday, August 22, 2007 1:37 PM
> To: [email protected]
> Subject: Calling a AMODE 31 program from AMODE 64
> 
> 
> Can someone please provide me a sample of how to call a AMODE 
> 31 program
> (ASM) from a AMODE 64 program (ASM) and pass parameters and 
> get return values.
> 
> I am able to BASR to AMODE 31 and execute it but unable to use R1 for
> passing parm address. I get a protection exception.
> 
> Thanks,
> Ludmila

Make sure that the data you are sending to the AMODE 31 program resides
in AMODE 31 storage. I had this sort of problem when we first when from
AMODE 24 to AMODE 31. 

Also, remember that BASR does not affect the addressing mode. So if you
are in AMODE 64 before the BASR, you are still in AMODE 64 in the other
module. To branch and change AMODE, you need to use the BASSM. And your
AMODE 31 code needs to use BSM to return, not BR! Otherwise, you'll need
to use a sequence  like SAM31, BASR, SAM64 to switch AMODEs in your
AMODE 64 code.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

----------------------------------------------------------------------
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