Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Reg :storage allocation of Comp variables(from IBm manual).

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
prabhucs01

New User


Joined: 07 Mar 2005
Posts: 40

PostPosted: Mon Jul 21, 2008 12:30 pm    Post subject: Reg :storage allocation of Comp variables(from IBm manual).
Reply with quote

The amount of storage occupied by a binary item depends on the number of decimal digits defined in its PICTURE clause:

__________________________________ _________________________________ | Digits in PICTURE Clause | Storage Occupied | |__________________________________|_________________________________| | 1 through 4 | 2 bytes (halfword) | |__________________________________|_________________________________| | 5 through 9 | 4 bytes (fullword) | |__________________________________|_________________________________| | 10 through 18 | 8 bytes (doubleword) | |__________________________________|_________________________________|


i just found this storage allocation chart from the IBM manual . Could anyone tell me how a single digit in a picture clause gets allocated.

For example PIC 9 gets its storage allocation. Does it take 4 bits for one Digit in picture class?

If so, then total Nine digits [pic 9(9) ] will take 36 bits (not 32 bits or full word)

Pardon me if this is an repeating question.
Back to top
View user's profile Send private message
References
agkshirsagar

Senior Member


Joined: 27 Feb 2007
Posts: 562
Location: Mumbai,India

PostPosted: Mon Jul 21, 2008 3:40 pm    Post subject:
Reply with quote

I think you are misinterpreting the manual.
It clearly says for 1 to 4 digits it will occupy 2 Bytes.
PIC 9 will need 2 bytes of storage.
Not like you are thinking 1 digit 4 bits and so on..
Back to top
View user's profile Send private message
UmeySan

Senior Member


Joined: 22 Aug 2006
Posts: 624
Location: Germany

PostPosted: Tue Jul 22, 2008 4:53 pm    Post subject:
Reply with quote

Hi !

For informations of storage allocations of comp fields, plse use the
search function. This has been discussed till death.
Back to top
View user's profile Send private message
prabhucs01

New User


Joined: 07 Mar 2005
Posts: 40

PostPosted: Tue Jul 22, 2008 7:47 pm    Post subject:
Reply with quote

ok...sorry mates
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1