Data Dictionary stripping keys on update

Started by James Zukowski, September 17, 2026, 12:00:06 PM

Previous topic - Next topic

James Zukowski

Some of our files are still using external keys. During F/M, the key value may not fill the field, so we are manually padding it to the full length.

With a Data Dictionary definition for the file set up having all discrete Delimited fields, the external key field is specified. If we need to update the file, however, the key value is stripped of trailing spaces in the updated file, even though the data field still retains them.

Is there any way to prevent this?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

EVa

In the dictionary, in the field that makes up the external key, did you select 'Padded' instead of 'Fixed' ?

James Zukowski

James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

If you want it to be fixed but with a delimiter, try defining the field as Last Substring. In the data it will be treated like Fixed with a delimiter added, i.e. padded when written and stripped when read. The external key value will be treated as padded.  See:
https://manual.pvxplus.com/page/Data%20Dictionary/Data%20Dictionary%20Maintenance/Element%20Description.htm
Jane Raymond

James Zukowski

The thing, though, is that we don't want is stripped at all. We already do all the processing on it to keep it padded in our application and for downstream apps.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

Last Substring will pad and add a delimiter when written. It's only when reading that the data field is stripped.
Jane Raymond

James Zukowski

So there's no real way to prevent it from being stripped in a file update that will leave both the key and data intact before/during/after reading/writing.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

I need some clarification. You say:
"If we need to update the file, however, the key value is stripped of trailing spaces in the updated file..."
Are you referring to updating the file within File Maintenance, or some other way like a dictionary update?
Jane Raymond