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

Addressing mode conflict


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Avinashhlg

New User


Joined: 05 Jan 2010
Posts: 7
Location: Bangalore

PostPosted: Wed Jan 06, 2010 7:03 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Thu Jan 07, 2010 9:29 am
Reply with quote

Launch IBM Book Manager (below link) and search for "Writing ILC Applications".

This subject has also been discussed several times on this board.

Language Environment compliance is the key issue here.

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Bill
Back to top
View user's profile Send private message
Himaprasad

New User


Joined: 05 Apr 2006
Posts: 2

PostPosted: Thu Jan 07, 2010 3:53 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jan 07, 2010 4:21 pm
Reply with quote

@ 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
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 93
Location: India

PostPosted: Mon Mar 29, 2010 4:46 pm
Reply with quote

@Avinashhlg

What is the RMODE of your Assembler program as well as Cobol sub program?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Mar 29, 2010 5:11 pm
Reply with quote

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
View user's profile Send private message
mkreutzian

New User


Joined: 26 Jan 2007
Posts: 3
Location: Iowa

PostPosted: Thu Jun 24, 2010 12:19 am
Reply with quote

Yes, Tis true Assembler can work in any mode, however it makes a differnce which mode the programmer can work in.
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 HILITE on Browse mode? TSO/ISPF 2
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts FIELDS OVERLAPPING WITH MODE = IN OR ... CICS 3
Search our Forums:

Back to Top