Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: What will be the size of PIC 9(06)V99 COMP-3
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: 755
Location: Germany

PostPosted: Mon Nov 06, 2006 6:41 pm    Post subject:
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    Post subject: Re: size of PIC 9(06)V99 COMP-3
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    Post subject: File Status -> 90
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: 95
Location: India

PostPosted: Mon Nov 27, 2006 5:46 pm    Post subject: Re: What will be the size of PIC 9(06)V99 COMP-3
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: 755
Location: Germany

PostPosted: Mon Nov 27, 2006 5:54 pm    Post subject:
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: 2278
Location: @my desk

PostPosted: Mon Nov 27, 2006 6:03 pm    Post subject:
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    Post subject: What will be the size of PIC 9(06)V99 COMP-3
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: 755
Location: Germany

PostPosted: Mon Nov 27, 2006 6:35 pm    Post subject:
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    Post subject: Re: What will be the size of PIC 9(06)V99 COMP-3
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: 755
Location: Germany

PostPosted: Tue Nov 28, 2006 12:59 pm    Post subject: Re: What will be the size of PIC 9(06)V99 COMP-3
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Increase the screen size after split mistah kurtz TSO/ISPF 2 Fri Sep 02, 2016 6:39 pm
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us