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

What is AMODE and RMODE in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Fri Apr 21, 2006 12:52 pm
Reply with quote

Hi all,

What is AMODE and RMODE in COBOL? What does 24 or 31 mean to it?

Thanks,
KS
Back to top
View user's profile Send private message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Tue Apr 25, 2006 2:58 pm
Reply with quote

Hi all,
Could get info on this :

AMODE - Addressing Mode/Access Mode

AMODE(24) indicates 24-bit (three-byte) addressing - memory below the line.
AMODE(31) indicates 31-bit addressing - memory above and below the line.
AMODE=ANY indicates the program may use either of the addressing technique.

RMODE - Run Mode/Residency Mode

RMODE(24) indicates that the program must be loaded into memory below the line
RMODE(31) indicates that the program can be loaded either below or above the line.
RMODE=ANY indicates that the program can be run in either 24 bit (below)or 31 bit memory(above).

Can anybody explain what is meant by above or below the line ?

Thanks,
KS
Back to top
View user's profile Send private message
mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Tue Apr 25, 2006 3:17 pm
Reply with quote

"The Line" is the 16 MB line. With 24-bit address, i.e. AMODE = 24, the program will be loaded below the 16MB line, i.e. an address when added to the load module size of the program will be less than 16 MB.

Above the line is where AMODE=31. By specifying AMODE=31 and RMODE=ANY, you are giving the OS the freedom to load the program anywhere, either below or above the 16MB line.

Significance of 16MB:
Nothing but 24 '1' in binary format. That is the maximum value that can be stored in a 24-bit (3 byte) area.

With AMODE = 31, the maximum address value will be 2 GB (31 '1' in binary format).

COBOL programs when compiled get translated into assembler first and then the assembler program is compiled to generate the load. Assembler uses something called registers to access memory locations. Each register is 4 bytes long (32-bits). In AMODE=24, only the first 3 bytes of the register are used for addressing. In AMODE=31, all 4 bytes except the leftmost is used for addressing. The extreme left byte is the sign bit.

Now this is conventional 32-bit machines. In 64-bit machines, the size of the register is 8 bytes. But so far, 64-bit OS still allows the programs to be loaded with AMODE=31.

Hope this helps.
Back to top
View user's profile Send private message
Ganesh Kalam
Warnings : 1

New User


Joined: 11 Aug 2005
Posts: 45
Location: India

PostPosted: Thu Mar 08, 2007 2:09 am
Reply with quote

But where should we specify these parameters. In the program ?
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Mar 08, 2007 12:35 pm
Reply with quote

no.. these should be specified ( RMODE and AMODE) in the compiler..
Back to top
View user's profile Send private message
shaktiprasad

New User


Joined: 20 Aug 2006
Posts: 34
Location: chennai

PostPosted: Sun Sep 20, 2009 2:02 pm
Reply with quote

Hi ,

I have some doubts here.Can anybody tell me
1) How do any body know what mode to provide in compiler options

2) Is there any valid combination which we should use for AMODE and RMODE values.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Sep 20, 2009 10:07 pm
Reply with quote

You've revived an old thread but 'am not sure what exactly you're looking for, however, hopefully these links might help you:

AMODE and RMODE considerations
Storage and its addressability
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 21, 2009 1:48 am
Reply with quote

Hello,

Quote:
Can anybody tell me
No one should even try. . .

You need to talk with your seniors and/or the technical support people and learn what is the standard on your system. Whatever it is, you need to follow the site-specific standard(s).
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Mon Sep 21, 2009 11:20 am
Reply with quote

mallikiran wrote:
In AMODE=31, all 4 bytes except the leftmost is used for addressing. The extreme left byte is the sign bit.

Hi mallikiran,
a small clarification....

You mentioned the leftmost byte as sign bit. I was thinking it to be an indicator which tells...
0 - 24 bit addressing
1 - 31 bit addressing

Guess the leftmost bit is used as a sign bit, when registers have some numerical value.

Please do correct me if I am wrong...
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top