Packed/Unpacked DD Items

choggy

Active Member
Hi everybody,

Please can somebody let me know how packed and unpacked DD numeric values are created in OneWorld? For example, CRR is a packed field and ICU is an unpacked field but I can't see any difference between them in the DD design.

Any help would be appreciated.

Thanks
 
Hi Chris,

You're right to question the difference between the two? There isn't seemingly a difference in the DD definition.

I believe this is wired into OneWorld JDEBASE component for AS/400.

Previously in World, when you created F0101, Address book number (AN8) was always zoned (8,0) and User reserved amount (URAT) was always packed (15,0). This was because the field reference files (World's DD equivalent) specified the formatting of these columns.

It's an obvious statement that odd-numbered sized fields pack better than even numbered sized fields, due to the AS/400's data packing rules.

To this, I would suggest that JDE still keeps an equivalent of it's field reference file internally (for co-existence purposes) to ensure the columns are created correctly.

ow_developer
Xe U5, AS/400, SP18.1
 
I tried my best to get some info abt how to create a packed or a zoned one from scratch,but couldnt get it yet.Anyway,if you need to create one, you can copy an existing zoned or a packed one and that would create a similar type one for you(For example if u create a dd item by copying U(Units),it would create a packed one as U itself is Packed).Good luck and keep us posted if you were able to get more info.
Badri
 
The way that JDE explained this to me, was that if you specify a field length of 4 or less it does not pack the field, if you specify a length greater than 4, it packs it. This did not appear to work this way when I tested it, but that was the answer I was given. This also makes it difficult to create a custom file that does not follow these JDE rules.

If you go into UTB and look in F9201 field FRDTAT shows the data type field that you can see in World but not in OneWorld.

If you are co-existent you can always create the field in World which allows you to define the field exactly as you want it - packed or not regardless of field size - since the Data Dictionary maintenance program allows you to enter the Data Type (DTAT) field.
 
I know this thread is very old, but I figured out the pattern and wanted to share it since I did not find any good explanation with a Google search.

JDE will set the zoned/packed data type based on the size when the DD item is created. This is as @MCCInet states. However, when a DD item is changed, the data type remains the same. So, if you are looking for a zoned numeric type that is 8,3 for example, follow this procedure:

1) Create your data dictionary item and specify its type to be numeric and its size to be 1.
2) Save your newly created DD item
3) If you want to confirm, review your new DD item in F9210|FRDTAT; the data type will be "S"
4) Go back in and change your DD item to have the desired size and decimal places (8 and 3 for my example), whether that be file decimals or display decimals but never both
5) Save your newly resize DD item
6) Review in F9210 again -- the FRDTAT remains "S" with the new size

I hope this helps!
 
Back
Top