Skip to main content

[archive] Adding Keys

  • October 3, 2008
  • 6 replies
  • 0 views

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

Thanks, I thought there may be an easier way

6 replies

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

Thanks, I thought there may be an easier way
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.

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

Thanks, I thought there may be an easier way
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

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

Thanks, I thought there may be an easier way
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.

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

Thanks, I thought there may be an easier way
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.

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

Thanks, I thought there may be an easier way
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.

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

Thanks, I thought there may be an easier way
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.