View previous topic :: View next topic
|
Author |
Message |
karthi_cts
New User
Joined: 24 May 2006 Posts: 3
|
|
|
|
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 |
|
|
ganasrinivasan
New User
Joined: 06 Nov 2006 Posts: 27 Location: Montreal
|
|
|
|
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 |
|
|
karthi_cts
New User
Joined: 24 May 2006 Posts: 3
|
|
|
|
Thanks a lot mate |
|
Back to top |
|
|
Mistermind
New User
Joined: 08 Feb 2008 Posts: 46 Location: Dublin
|
|
|
|
It the 24-bit subroutine tries to pass data back to the 31-bit caller there will be trouble. |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
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 |
|
|
Mistermind
New User
Joined: 08 Feb 2008 Posts: 46 Location: Dublin
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
|