Highlighted
Absent Member.
Absent Member.
686 views

[archive] Adding Keys

[Migrated content. Thread originally posted on 03 October 2008]

Thanks, I thought there may be an easier way
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Adding Keys

What's the preferred method for re-building an indexed file to include a new key. If there a utility to do it or do you have to define the new file with the new key, define it with the existing key and read/write the old to the new.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Adding Keys

You'll need to write a COBOL program with the old select and fd and the new select and fd and read from old writing to the new.
🙂

Vutil can be used to generate a new file and you could use vutil to export from old and import into new, but you'ld need to write a script to tell vutil all of that
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Adding Keys

Seems to me if you are just adding alternate keys you can just unload the file using vutil then load it... Not 100% sure tho, we usually just write code to move from old to new regardless tho.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Adding Keys

I guess what I was looking for was a utility that copies the contents of a file to the contents of another without altering the structure. If a had a file with fields A,B and C and A was the key and I wanted B to be a key. I could create an empty file with A and B as keys and then use a disk-to-disk utility to copy the contents from old to new and not have to bother with a program that defines both files, opens one for input the other for output, etc, etc. I'm used to a mainframe environment and those things are fairly common so before I assumed that I need a program to do things like this I wanted to make sure that there were not utilities available.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.