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

Adventage of Fixed format compression?


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon Jul 27, 2009 8:44 am
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Mon Jul 27, 2009 9:19 am
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
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

Moderator Emeritus


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

PostPosted: Mon Dec 14, 2009 3:52 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top