Total Answers and Comments: 7
Last Update: August 22, 2008 Asked by: Bharath
No best answer available. Please pick the good answer available or submit your answer.
March 18, 2006 19:58:11 #2
Culver_lake
Member Since: March 2006 Contribution: 46
RE: How may do the following definitions occupy?... Poor syntax. S9(3)V99 is correct and occupies 3 bytes. Count the number of 9's add 1 and divide by 2 rounding up if necessary. ex.
S9(7)v99. there are 9 nines. (9+1)/2 = 5 bytes.
S9(6)V99. there are 8 nines (8+1)/2 = 4.5 = 5 bytes.
binary data (COMP) has no fractions, integers only.
Is this answer useful? Yes | No
April 05, 2006 00:17:34 #3
Anuja Tiwari
RE: How may do the following definitions occupy?... COMP fields are stored as binary.
9(1) to 9(4) are stored as 2 Binery. 9(5) to 9(9) are stored as 4 Binery. 9(10) to 9(18) are stored as 8 Binery.
so if your question is for S9(1)V9(2) comp, it will be in Binery form and occupy 2 bytes.
Is this answer useful? Yes | No
April 26, 2006 05:44:30 #4
NarayaN
RE: How may do the following definitions occupy?... Can we generalize as follows,
S9(x)V9(y) will occupy (x+y+1)/2 bytes (Rounded to the next higher integer).
Is this for a USING COMP or COMP 3? How is the number of bytes calculated for the other?
Thanks!!
NarayaN
Is this answer useful? Yes | No
July 20, 2006 05:20:01 #6
Rajeev Saklani
RE: How may do the following definitions occupy?... Hi,
ur question for comp and comp-3 storage
u have mentioned comp and assumed decimal v, for comp it is pure binary value and decimal is not allowed and storage formula is n/2 where n is number of 9's. For comp-3 we have (n/2 +1) where n is the no of 9's in integer and decimal parts. eg s9(3)v99 would occupy 5/2 +1 = 3 bytes.
for decimal we have comp-1 and comp-2 in halp word and fullword format
correct me if i am not right.
Rajeev saklani
Mainframe s/w engg
Is this answer useful? Yes | No
Go To Top