I cannot remember why we don't want to do this - I was thinking it might be the signed portion of the packed field. I have a manager asking why we don't use packed fields in a key. Any input is appreciated. thank you
You can use signed packed decimal fields in a key if you make that key data-sensitive.
If you don't then you get warning message DDWKEY0013 during the catalog of the database:
SIGNED NUMERIC FIELD IN KEY
During the verification of a DATABASE structure, a KEY substructure was detected that contains a FIELD entity-occurrence with a TYPE attribute-value of N or D and a SIGN attribute-value of Y. Use of a signed numeric FIELD entity-occurrence in a key can cause the data records to be sorted and retrieved in a different sequence than expected.
This is a warning message only. No action is required if this manner of sorting and retrieval is acceptable. To obtain a logical sorting sequence, change the KEY entity-occurrence DATA-SENSITIVE attribute-value to Y.
Have a great day, Karina.
Thank you - I will pass this along.