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
 

 

Addressing mode conflict

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Addressing mode conflict
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 07, 2010 9:29 am    Post subject: Reply to: Addressing mode conflict
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.

http://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    Post subject:
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: 757
Location: Germany

PostPosted: Thu Jan 07, 2010 4:21 pm    Post subject:
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: 94
Location: India

PostPosted: Mon Mar 29, 2010 4:46 pm    Post subject: Reply to: Addressing mode conflict
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: 8119
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 29, 2010 5:11 pm    Post subject:
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    Post subject:
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    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 What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Calling macro via rexx in batch mode. SanaR CLIST & REXX 15 Tue Mar 08, 2016 4:46 pm
No new posts Edit not allowing in dataset after Po... krsenthil85 TSO/ISPF 8 Mon Jul 13, 2015 10:27 pm
No new posts VSAM share mode ashim prodhan JCL & VSAM 7 Wed Jun 03, 2015 7:54 pm
No new posts HEX ON on View mode Vs Browse Mode krsenthil85 TSO/ISPF 3 Wed May 13, 2015 3:03 am


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