HP 3000 Manuals

RENAME [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation


KSAM/3000 Reference Manual

RENAME 

Renames either the data or key file of a KSAM file.

  {RENAME}
> {R     }oldfilereference, newfilereference [,TEMP]

The KSAMUTIL RENAME command can be used to change either the KSAM data
file name or the KSAM key file name to a new name.  Following execution
of RENAME, the data and key files retain their relation to each other.
Note that if the MPE :RENAME command is used, this relation is severed.
The FRENAME intrinsic cannot be used to rename a KSAM file.

PARAMETERS 

oldfile-         Current actual file designator identifying the KSAM data
reference        file or the KSAM key file, specified exactly like
                 filereference1 or filereference2 in the BUILD command.

                 (Required parameter.)

newfile-         New actual file designator in same format as
reference        oldfilereference.  The file named by oldfilereference 
                 will be given the name specified by newfilereference.

                 (Required parameter.)

TEMP             Indicates that old file was, and new file will be, a
                 temporary file in the session/job temporary file domain.

                 (Optional parameter.)

                 Default:  If omitted, permanent file is assumed.

RENAMING A KSAM FILE 

You may rename either the data file or the key file, not both, with one
>RENAME command.  To rename the entire file, you must specify the RENAME
command twice.  Thus, to rename the data file KSAMFILE and its associated
key file KFILE:

     >RENAME KSAMFILE,NEWDATA 
     >RENAME KFILE, NEWKEY 

The relation between keys and data in the newly named files is the same
as that in the files KSAMFILE and KFILE.

If the data file being renamed was protected by a lockword, then this
lockword must be specified on both the old and new files if it is to be
retained.  If the lockword is omitted, it is removed when the file is
renamed.  Note that a lockword is never specified when renaming the key
file; the keyfile is protected automatically by any lockword assigned to
its associated data file.  For example, to assign a new lockword to the
data file DATAFIL:

     >RENAME DATAFIL/LOCKA, DATAFIL/LOCKB <---- new lockword 

Note that the new file name need not be in the same group as the old file
name.  RENAME provides a way to move a file from one group to another.
For example, to move the KSAM file DATAFILE with its associated key file
KEYFILE from GROUPA to GROUPB:

     >RENAME DATAFILE.GROUPA,DATAFILE.GROUPB

Note that only one RENAME command is used.  This one command insures that
both the data file and the key file are in the same group.



MPE/iX 5.0 Documentation