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
 

 

Adventage of Fixed format compression?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Mon Jul 27, 2009 8:29 am    Post subject: Adventage of Fixed format compression?
Reply with quote

Hi,

Can someone please let me know the adventage of fixed format compression?

In the SAG manual it is written like

Fields defined as fixed format (FI) do not include a length byte and are not compressed. This option actually saves storage space for one-byte fields or fields that are nearly always full (e.g., a field containing the social security number).

Does it mean that, for the fileds 'one-byte fields or fields that are nearly always full' it is saving 1byte of space by not including the length byte?

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jul 27, 2009 8:44 am    Post subject:
Reply with quote

Hello,

Quote:
Does it mean that, for the fileds 'one-byte fields or fields that are nearly always full' it is saving 1byte of space by not including the length byte
Yes. If a field is defined as one byte, there is no reason to use another byte to define the length. It is completely wasted.

Similarly, if there is a Code that must always contain exactly 7 bytes, there is no reason to provide space for the length.
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Mon Jul 27, 2009 9:07 am    Post subject:
Reply with quote

Thank you d.Sch for clarifying my doubt. :-)
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jul 27, 2009 9:19 am    Post subject: Reply to: Adventage of Fixed format compression?
Reply with quote

You're welcome icon_smile.gif

d
Back to top
View user's profile Send private message
Ralph Zbrog

New User


Joined: 21 Nov 2009
Posts: 58
Location: California

PostPosted: Sun Dec 13, 2009 3:19 pm    Post subject:
Reply with quote

dick scherrer wrote:
If a field is defined as one byte, there is no reason to use another byte to define the length. It is completely wasted.

Completely wasted? Not entirely true. You won't define every one-byte field as Fixed just to avoid wasting the length byte.

Let's say that you have a field defined as A1, always containing either "Y" or "N", and used in a superdescriptor. A READ by this superdescriptor would return all records, both Y and N.

But what if you stored only "Y" or " " in the field? By defining the field as Null-suppressed instead of Fixed, a READ by the superdescriptor would return only records containing "Y". This technique can drastically reduce the number of records processed and improve performance - well worth the "wasted" length byte.

You can reduce the waste of compressed fields by defining them as contiguous null-suppressed fields in the Adabas record. Multiple null-valued, null-suppressed fields will occupy a single byte in the compressed record. This is why, when you look at a DDM, most fields are defined with N in the suppression column. Most DBAs specify N as the default.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Dec 14, 2009 3:52 am    Post subject:
Reply with quote

Hello,

I'll stay with my original answer (true for many database systems, not necessarily Adabas/Natural). Having the length for a one-byte or "always full" field is a complete waste. . .

Not that this is all bad. Tuning issues often cause exceptions (waste) to "waste free" implementation. Most commonly in my experience is to de-normalize certain data in end-user, query-only databases.

To single out the extremely rare 'Y' or ' ' versus 'Y' or 'N' goes way beyond a "helpful hint". . . icon_wink.gif
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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