View previous topic :: View next topic
|
Author |
Message |
Avinashhlg
New User
Joined: 05 Jan 2010 Posts: 7 Location: Bangalore
|
|
|
|
Currently I have a COBOL program calling a utility program. This utility program is no longer supported and hence I have to replace this with assembler program only. But the new assembler program has to call a new COBOL code for business processing.
COBOL(Main)--->Assembler(Subprogram)--->COBOL(Subprogram)
We have compiler options for COBOL as AMODE(31) and RMODE(ANY).
Default assembler compile option is AMODE(ANY)
If I run the programs I get S0C4 abend. (Mainly because of the AMODE issue)
But just COBOL(main) calling Assembler(subprogram) works fine. Issue is when I call COBOL(subprogram) from assembler program. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
Himaprasad
New User
Joined: 05 Apr 2006 Posts: 2
|
|
|
|
If the main program is Assembler and the sub is a Cobol program, in which case the cobol program can be complied with Amode(31) and Rmode(any) but the assembler program should be complied with Amode(24) and Rmode(24) and the while linking Amode(24) and Rmode(24). Assembler works on 24 bit addressing mode.
Assembler progs have to be compiled with Amode(24) and Rmode(24) only. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
@ imaprasad !
>> Assembler progs have to be compiled with Amode(24) and Rmode(24) >> only.
Sorry Sir, NO !!! Assembler could also be AMODE(31) !!!
Assembler-Tip : When Assembler calls Cobol in different Amode, best is to store the mode before transfering control. After receiving back control, restore mode. |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
@Avinashhlg
What is the RMODE of your Assembler program as well as Cobol sub program? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Himaprasad, your statement
Quote: |
Assembler works on 24 bit addressing mode. |
is true. However, Assembler also works in 31-bit addressing mode and it works in 64-bit addressing mode. Assembler allows any of AMODE 24, AMODE 31, AMODE 64 so your comment about assembler requiring 24-bit addressing is completely wrong. I suspect you also need to research the DCBE macro to find out that assembler programs no longer have to be compiled 24-bit for the DCB. |
|
Back to top |
|
|
mkreutzian
New User
Joined: 26 Jan 2007 Posts: 3 Location: Iowa
|
|
|
|
Yes, Tis true Assembler can work in any mode, however it makes a differnce which mode the programmer can work in. |
|
Back to top |
|
|
|