Howto INCREASE External Key Size on DIRECT/KEYED files

Started by, May 09, 2023, 11:38:19 AM

Previous topic - Next topic

Hi all,
Is there an easy way to increase the external key size on a direct/keyed file?  This file has only one external key.
In the screenshot below, the external key size is 20, how do we go about increasing this to 30, without having to create a new direct file and then copy records from current file.
Thank you!

Ken Sproul

To my knowledge there is no way to increase the key size of a direct file.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Mike Hatfield

Many moons ago in the days before self-expanding files we wrote a utility program to change key size, change record length and the number of records in the file. I think I was a lot younger then  :-\
Mike H

Thank you, Mike!
Thought that PVXPlus may have a utitlity to do this and expand the external primary key, etc..

James Zukowski

The text-based utility that exists in PxPlus will copy from one file to another with the option to "restructure" it in the process. From command level, you can:
call "*U" -> F -> C
Follow the prompts, and you should be able to figure it out. You'll need to copy to a new file name and then do some renaming afterwards.
James Zukowski
Sr. Developer - J&E

Brand Industrial Services

Thank you, James!. 
We have already created a program to help us do this.  We just did not want to re-invent the wheel.