Subject says it all really.
I've searched this forum without turning up anything useful.
If anybody could shed any light, I'd be most grateful.
Cheers,
Rob
Is it possible to rename a hashed file?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes it's possible, but how you do it depends on how you created it in the first place.
If it was created in the account, then the command - which can be executed through the Administrator client Command window - is CNAME.
If the hashed file was created in a directory and there is no VOC pointer to it, then use operating system commands to change both the data and dictionary portions. For UNIX the command is mv, for Windows the command is RENAME (or REN).
If a VOC entry has been created to point to a pathed hashed file, make the same change as above for the pathed hashed file, then update the VOC entry. For example, on UNIX:
Finally, if the hashed file was created as a UniVerse table, it can not be renamed, but must be dropped and re-created. If the hashed file has had indexes defined, then additional changes are required, including changing the name of the index directory from I_oldname to I_newname then executing a SET.INDEX command to tell the hashed file where its indexes now are.
If the hashed file is a part file in a Distributed file it can not be renamed.
If it was created in the account, then the command - which can be executed through the Administrator client Command window - is CNAME.
Code: Select all
CNAME oldname TO newname
Code: Select all
mv /path/name/oldname newname
mv /path/name/D_oldname D_newname
Code: Select all
REN X:\Path\Name\oldname X:\Path\Name\newname
REN X:\Path\Name\D_oldname X:\Path\Name\D_newname
Code: Select all
UPDATE VOC
SET F0='newname',
F2='/path/name/newname',
F3='/path/name/D_newname'
WHERE F0 = 'oldname';
If the hashed file is a part file in a Distributed file it can not be renamed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.