IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

is it possible to have AMODE 31 Calling Amode 24 program


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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: 27
Location: Montreal

PostPosted: Tue Oct 23, 2007 9:12 pm
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
Reply with quote

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

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Sun Mar 16, 2008 3:08 am
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
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

New User


Joined: 08 Feb 2008
Posts: 46
Location: Dublin

PostPosted: Fri Mar 21, 2008 2:42 am
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 21, 2008 3:02 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top