Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-136
FILE_RENAME_ Procedure
newname:length input:input
STRING .EXT:ref:*, INT:value
contains the file name to be assigned to the specified disk file. The value of
newname must be exactly length bytes long. It must be a valid disk file name or
the name of a DEFINE that designates a valid disk file name. If the file name is
partially qualified, it is resolved using the contents of the =_DEFAULTS DEFINE.
Considerations
•
Purge access for FILE_RENAME_
The caller must have purge access to the file for the rename operation to be
successful; otherwise, FILE_RENAME_ returns error 48 (security violation).
•
Volume specification for newname
The disk volume designated in
newname (explicitly or implicitly) must be the same
as the volume specified when opening the file. Neither the volume name nor the
system name can be changed by FILE_RENAME_.
•
System specification for newname
If a system is specified as part of
newname, it must be the same as the system
name used when the file was opened.
•
Partitioned files
When the primary partition of a partitioned file is renamed, the file system
automatically renames all other partitions located anywhere in the network.
•
Renaming a file audited by the Transaction Management Facility (TMF) subsystem
The file to be renamed cannot be a file audited by the TMF subsystem. An attempt
to rename such a file fails with error 80 (invalid operation attempted on audited file
or nonaudited disk volume).
•
Structured files with alternate keys
If the primary-key file is renamed, it remains linked with the alternate-key file. If
you rename the alternate-key file and then try to access the primary-key file, an
error 4 (failure to open an alternate key file) occurs because the primary-key file is
still linked with the old name for the alternate-key file. You can use the File Utility
Program (FUP) ALTER command to correct this problem.
•
SQL/MX Objects
FILE_RENAME_ cannot be used with SQL/MX objects.
Safeguard Considerations
For information on files protected by Safeguard, refer to the Safeguard Reference
Manual.