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
 

 

What is AMODE and RMODE in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: What is AMODE and RMODE in COBOL
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: What is AMODE and RMODE in COBOL
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

Senior Member


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

PostPosted: Sun Sep 20, 2009 10:07 pm    Post subject:
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

Site Director


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

PostPosted: Mon Sep 21, 2009 1:48 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


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