Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

is it possible to have AMODE 31 Calling Amode 24 program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
karthi_cts

New User


Joined: 24 May 2006
Posts: 3

PostPosted: Mon Oct 22, 2007 3:26 pm    Post subject: is it possible to have AMODE 31 Calling Amode 24 program
Reply with quote

Hi,

i have a cics program in 31/Any calling Assembler module 24/24. i have read it wont work but i can see this working in our production environment. Can somebody please explain.

thanks,
Karthikeyan.E
Back to top
View user's profile Send private message

ganasrinivasan

New User


Joined: 06 Nov 2006
Posts: 23
Location: Montreal

PostPosted: Tue Oct 23, 2007 9:12 pm    Post subject: Reply to: is it possible to have AMODE 31 Calling Amode 24 p
Reply with quote

That depends on how they are calling that 24 bit program.
If it is through CICS LINK then cics will take care of the linkage parameters. If you are calling via any other method then you have to take care of accessing memory above the line which is allocated by the 31 bit program. If that 24 bit program is the stand alone program or if it is not accessing the memory alocated by 31 bit program then there is no problem
Back to top
View user's profile Send private message
karthi_cts

New User


Joined: 24 May 2006
Posts: 3

PostPosted: Thu Oct 25, 2007 4:32 pm    Post subject:
Reply with quote

Thanks a lot mate
Back to top
View user's profile Send private message
Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 3:08 am    Post subject:
Reply with quote

It the 24-bit subroutine tries to pass data back to the 31-bit caller there will be trouble.
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Fri Mar 21, 2008 1:05 am    Post subject: Re: is it possible to have AMODE 31 Calling Amode 24 program
Reply with quote

karthi_cts wrote:
Hi,

i have a cics program in 31/Any calling Assembler module 24/24. i have read it wont work but i can see this working in our production environment. Can somebody please explain.

thanks,
Karthikeyan.E



31 calling 24 => Program Datalocation Below necessary i think.

may also be dependent on on LE option ALL31, STACK
Back to top
View user's profile Send private message
Mistermind
Warnings : 2

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Fri Mar 21, 2008 2:42 am    Post subject:
Reply with quote

The 24/24 subroutine can only safely access addresses below 16MB (24 bits), adcons and vcons inside that subroutine cannot be relied on NOT to corrupt the high-order byte the way old IBM macros take liberties with the (spare) high-order byte to store work-values.

If your 24/24 subroutine accepts an adcon parameter from the 31/ANY caller, an address which in reality is only 24 bits (the 31/ANY program was loaded in RMODE 24, at a storage location below 16M), then the 24/24 subroutine will be ok, because both caller and subroutine are in practice functioning with 24-bit addresses.

However if the calling program's adcon parameter happens to be a true 31-bit address (caller loaded RMODE=31), then the 24/24 subroutine may or may not work, depending on whether any old macros or old code in the 24/24 subroutine have taken liberties and corrupted the high-order 8 bits, i.e. tampers with the 31-bit address from 31/ANY caller.

In summary, not a safe situation, the 24/24 subroutine should have its code converted to AMODE31.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 21, 2008 3:02 am    Post subject: is it possible to have AMODE 31 Calling Amode 24 program
Reply with quote

The IBM documented method of doing this is by using the BASSM instruction to call the 24-Bit sub-program (BASSM 14,15), followed by the 24-Bit sub-program issuing a BSM, instead of a BR 14, (BSM 0,14) to return control back to the 31-Bit caller. BSM is a RR instruction.

You need the LP address of the 24-Bit sub-program loaded into R15 before issuing the BASSM, with R14 automatically containing the address of the "NSI" (Next Sequential Instruction) in the caller, upon return from the sub-program, which is the same expectations as if you used a BALR or BASR to call a sub-program having the same AMODE/RMODE characteristics as the caller.

The LP address is normally obtained via a LOAD Macro or by using an EXTRN directive in the main-program (caller), pointing to the given target sub-program.

Regards,

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us