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

Memory size allocation for Comp data


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

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Sun Jan 13, 2008 1:23 pm
Reply with quote

Number of 9's length in bytes

1 to 4 2 Bytes(halfword)
5 to 9 4 Bytes(fullword)
10 to 18 8 Bytes(double word)

if the first four digits require 2 bytes(4bits/digit) then for total 9 digits it must be 36 bits and for 18 must be 72 bits.

could anyone give a detail about hw its been stored. i have checked with the below link too

ibmmainframes.com/size.html

sorry if the question is been asked before too. please help me in knowing the way the digits are stored.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sun Jan 13, 2008 6:57 pm
Reply with quote

prabhucs01 wrote:
Number of 9's length in bytes

1 to 4 2 Bytes(halfword)
5 to 9 4 Bytes(fullword)
10 to 18 8 Bytes(double word)

if the first four digits require 2 bytes(4bits/digit) then for total 9 digits it must be 36 bits and for 18 must be 72 bits.

could anyone give a detail about hw its been stored. i have checked with the below link too

ibmmainframes.com/size.html

sorry if the question is been asked before too. please help me in knowing the way the digits are stored.


There is not a direct correspondence between the number of decimal digits and the number of binary bits. 8 bits (1 byte) can hold some three decimal digit numbers, 16 bits (2 bytes) can hold some 5 decimal digit numbers.
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 How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top