View previous topic :: View next topic
|
Author |
Message |
abin
Active User
Joined: 14 Aug 2006 Posts: 198
|
|
|
|
What will be the size of PIC 9(06)V99 COMP-3
Thanks |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Normaly 5 bytes packed decimal.
But please have a look at your compilation-List. At the almost right side at
your field declaration you could see the used allocated bytes.
9(6)V9(2) comp-3 -> 0x xx xx xx xC in hex
Regards, UmeySan |
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
PIC 9(06)V99 COMP-3
it will calculate as
(8 + 1) / 2 = 4.5 it will round this to 5 bytes
so the size of this is 5 bytes |
|
Back to top |
|
|
senthildots
New User
Joined: 23 Nov 2005 Posts: 6 Location: Chennai
|
|
|
|
Hi,
In my cobol program im using flat files... while opening the files its giving
file status as 90.
i checked with the error assit... its showing vsam logic error.
actually. im creating the flat files from cobol program (dynamically) and assigning to the dd name from my cobol program itself.
upto the above process its working successfully.
while opening that file im getting file status as 90.
if, any one came across this situation. pls. help me to over come this
problem.
thanx in advance
regards
senthil.s. |
|
Back to top |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hi Abin
It will take only four bytes since the data name is declared as an assumed decimal value.
Hence, it will take only four bytes.
6/2 + 1 =3.5 = 4 Bytes |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
@rajesh_mbt !
He was talking about PIC 9(06)V99 COMP-3
So it's (8 + 1) / 2 !!!
Regards, UmeySan |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
It is ( n + 1 ) / 2 ...NOT ( n / 2 ) + 1. |
|
Back to top |
|
|
Farooq
New User
Joined: 24 Nov 2006 Posts: 15 Location: Chennai
|
|
|
|
Hi,
I too Agree with UmeySan, its (N+1)/2
Thanks!
Farooq |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi arcvns !
Yes ! As I wrote (8 + 1) / 2 !
But what I was talking about ist, that 9(06)V99 is 8 numeric digits
and not 6 numeric digits as rajesh_mbt mentioned.
So you have 6 before and 2 after the decimal point !
Regards, UmeySan |
|
Back to top |
|
|
vijay_bn79
New User
Joined: 20 Nov 2006 Posts: 48 Location: Hyderabad
|
|
|
|
Hi..,
It will take 5 bytes |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi All !
To end up this discussion:
Type it in, in a cobol-programm, then compile programm.
Now, please have a look at your compilation-list. At the almost right side at your field declaration you could see the used allocated bytes.
Also you could look at the assembly-list of cobol-code.
So if you ever worry about a field length, just do like this and you could
see it yourselfe.
Regards, UmeySan |
|
Back to top |
|
|
|