|
|
| Author |
Message |
prabhucs01
New User
Joined: 07 Mar 2005 Posts: 40
|
|
|
|
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 |
|
 |
References
|
Posted: Mon Jul 21, 2008 12:30 pm Post subject: Re: Reg :storage allocation of Comp variables(from IBm manual). |
 |
|
|
 |
agkshirsagar
Senior Member
Joined: 27 Feb 2007 Posts: 547 Location: Mumbai,India
|
|
|
|
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 |
|
 |
UmeySan
Senior Member
Joined: 22 Aug 2006 Posts: 624 Location: Germany
|
|
|
|
Hi !
For informations of storage allocations of comp fields, plse use the
search function. This has been discussed till death. |
|
| Back to top |
|
 |
prabhucs01
New User
Joined: 07 Mar 2005 Posts: 40
|
|
|
|
| ok...sorry mates |
|
| Back to top |
|
 |
|
|