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

What will be the size of PIC 9(06)V99 COMP-3


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

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Mon Nov 06, 2006 6:33 pm
Reply with quote

What will be the size of PIC 9(06)V99 COMP-3

Thanks
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Nov 06, 2006 6:41 pm
Reply with quote

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
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Fri Nov 24, 2006 5:50 pm
Reply with quote

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
View user's profile Send private message
senthildots

New User


Joined: 23 Nov 2005
Posts: 6
Location: Chennai

PostPosted: Mon Nov 27, 2006 5:05 pm
Reply with quote

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
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Mon Nov 27, 2006 5:46 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Nov 27, 2006 5:54 pm
Reply with quote

Hi !

@rajesh_mbt !

He was talking about PIC 9(06)V99 COMP-3
So it's (8 + 1) / 2 !!!

Regards, UmeySan
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 27, 2006 6:03 pm
Reply with quote

Hi

It is ( n + 1 ) / 2 ...NOT ( n / 2 ) + 1.
Back to top
View user's profile Send private message
Farooq

New User


Joined: 24 Nov 2006
Posts: 15
Location: Chennai

PostPosted: Mon Nov 27, 2006 6:34 pm
Reply with quote

Hi,

I too Agree with UmeySan, its (N+1)/2


Thanks!
Farooq
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Nov 27, 2006 6:35 pm
Reply with quote

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
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Tue Nov 28, 2006 9:55 am
Reply with quote

Hi..,

It will take 5 bytes
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue Nov 28, 2006 12:59 pm
Reply with quote

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
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 Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top