I need to extend the length of a field in a physical file

It currently is 256 byte field

I want to make it 1028 variable length field

So I changed the DDS to specify Length of 1028 with VARLEN(30)

Then I did CHGPF and when I look in the physical file I see that the length
of the field for all of the existing records is set to
the original fixed length of 256 even though most of the fields are blank or
only have a few bytes of data in it

New records added are fine

I have tried both CHGPF and CRTPF with CPYF using *MAP *DROP and both set
the field length of existing records to 256 (old fixed length value)



My question is:

Is there any easy way to change the physical file and get the field length
set to the length of the actual data in the field as opposed to the old
fixed length?

I suppose I could write a small program to read the old file and write to
the new file.

But CHGPF or CRTPF with CPYF are so much easier



John




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.