IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Maximum storage in a packed filed

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
View previous topic :: View next topic  
Author Message
bipinpeter



Joined: 18 Jun 2007
Posts: 47
Location: pune

Posted: Mon Aug 18, 2008 9:34 am    Post subject: Maximum storage in a packed filed  

Hi All,
I've a doubt about the maximum storage in the packed fields.What is the maximum value store in a 3 byte packed field?.I understood that if we assign 3 byte field,if it is packed it will take 6 bytes.Please tell me is it correct or not?
Regards,
Bipin Peter
Back to top  
Sambhaji



Joined: 16 Feb 2007
Posts: 267
Location: Pune, India

Posted: Mon Aug 18, 2008 11:33 am    Post subject:  

maximum storage will be five digits and definition will be PIC S9(5)
for more information see below link
<<http://www.simotime.com/datapk01.htm>>
Back to top  
dick scherrer



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Mon Aug 18, 2008 11:57 am    Post subject:  

Hello,

Quote: I understood that if we assign 3 byte field,if it is packed it will take 6 bytes.Please tell me is it correct or not? This is not correct.

A 3-byte field can hold a s999 (zoned decimal) value or an s9(5) comp-3 (packed decimal) value.

I do not understand how a 6-byte reference relates to the max a 3-byte field may contain.

If i'ver misunderstood something, please clarify.
Back to top  
bipinpeter



Joined: 18 Jun 2007
Posts: 47
Location: pune

Posted: Mon Aug 18, 2008 11:58 am    Post subject:  

I mean that can we store 6 digit number in a 3 byte packed filed?if so what is the maximum value i can store in it?
Back to top  
dick scherrer



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Mon Aug 18, 2008 12:03 pm    Post subject:  

Hello,

(99999+) - S9(5) comp-3 - is the largest packed decimal value that can be stored n 3 bytes.

5 nibbles (1/2 bytes for the digits) and 1 nibble fro the sign (c, d, or f).
Back to top  
bipinpeter



Joined: 18 Jun 2007
Posts: 47
Location: pune

Posted: Mon Aug 18, 2008 1:31 pm    Post subject:  

Actually my problem is that,in quikjob report ,i given ACCUM size is 3 byte,after 125532 records it abended with because of overflow.So i want to know that what should be the maximum value we can store in the 3 byte packed filed.
Back to top  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1639
Location: germany

Posted: Mon Aug 18, 2008 2:23 pm    Post subject:  

one of the other sites has an ICON of someone banging themselves on the head with a hammer - trying to understand the OP's question - or conversely, suggesting that the OP is a little thick-headed.

But in this case, it could be that the OP just does not understand diddly squat because he has not bothered to read any documentation.

Even though I consider it poor form to give links to non-IBM documents to explain very basic concepts, the link provided by Sambhaji had enough pictures, even a non-english speaker could understand the concept.

Since the OP obviously only wants a simple answer and does not want to invest anytime whatsoever trying to answer his/her own question:

a 3 byte Packed-Decimal field will hold 99,999 with or without sign.

i think I need to change my avatar, again.
Back to top  
Anuj D.



Joined: 22 Apr 2006
Posts: 2229
Location: Phoenix, AZ

Posted: Mon Aug 18, 2008 3:05 pm    Post subject:  

dbzTHEdinosauer wrote: i think I need to change my avatar, again. Gladiators also need rest at times..so .. :) ..

By the way do you know, "avatar" is an Indian word, I mean this is taken from a native language of here..
Back to top  
dick scherrer



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Mon Aug 18, 2008 8:04 pm    Post subject:  

Hello,

Quote: So i want to know that what should be the maximum value we can store in the 3 byte packed filed. There is a difference between persistent and simply stubborn. . .

You have been told multiple times the maximum value that will "fit" into a 3-byte packed-decimal/comp-3 field is 99999(+ or -). That answer is not going to change. . .

Quote: i given ACCUM size is 3 byte,after 125532 records it abended ... Why do you believe this is a packed-decimal field?

What have you learned from the quickjob documentation? Have you looked at the quickjob documentation? Have you tried using a larger accumulator? What happened?
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM