FRENAME [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
FRENAME
NM and CM callable.
Renames an open disk file (and its lockword, if applicable). The file
being renamed must be either:
* A new file.
* An old file (permanent or temporary), opened for exclusive access
with the exclusive option of the HPFOPEN/FOPEN intrinsics, and
with security provisions allowing write access.
Syntax
_____________________________________
| |
| I16V CA |
| FRENAME(filenum,formaldesig); |
_____________________________________
Parameters
filenum 16-bit signed integer by value (required)
Passes the file number of the file to be renamed.
formaldesig character array (required)
Passes a formal file designator interpreted
according to MPE-escaped semantics. The file name
must be terminated by a nonalphanumeric character
other than a period (.), a slash (/), a hyphen (-),
and an underscore (_).
The file referred to by formaldesig can be either
an MPE file (i.e., one that uses MPE syntax) or it
can follow HFS syntax. If formaldesig follows MPE
syntax, the file name can include password, group,
and account in the following format:
filename/lockword.group.account
To keep or add a lockword to the file, enter it in
the ASCII string. If you do not specify a group,
the file will remain in the same group it was
assigned before you invoked FRENAME. If you are
renaming a new or temporary file, specify any
account that shares the same volume set as the file
referred to by formaldesig.
If formaldesig follows HFS syntax, the file name
must start with either a dot (.) or a slash (/).
If formaldesig is an escaped pathname:
* you cannot reference remote files
* it cannot express a name equivalent to
filename:envid
* you cannot use the device parameter
(device=node#) to specify the remote
location of a device
If formaldesig is the name of a user-defined file,
it can begin with an asterisk (*). If formaldesig
is the name of a system-defined file, it can begin
with a dollar sign ($). When creating a KSAM file,
formaldesig must be a unique file name, that is,
one not currently existing in the permanent file
directory.
The formal file designator can contain command
interpreter variables and expressions that are
evaluated before formaldesig is parsed and
validated.
The file referred to by formaldesig may reside
either in an MPE group or in an HFS directory.
If renaming a file, a process must have the
following:
TD Traverse directory entry to
access to all directories
specified in formaldesig. If
formaldesig is specified as
file.group.account, the
directories are the root
directory, the account, and
the MPE group. If there is
no TD access, FRENAME fails
and a call to FCHECK with
filenum set to 0 will return
a system error code (398) in
the fserrorcode parameter.
CD Create directory entry to
access to the new parent
directory.
DD Delete directory entry to
access to the old parent
directory.
SF Save files capability.
The file referred to by formaldesig may reside
either in an MPE group or in an HFS directory.
If a file is referenced by filenum, you can rename
it within the hierarchical directory as long as the
process invoking FRENAME has sufficient access and
the restrictions are satified. FRENAME intrinsic
fully qualifies the file owner name. Only file
owners and users with appropriate privilege can
manipulate a file's lockword.
The home volume set of formaldesig must be the same
as the file being renamed. Volume sets cannot be
spanned when renaming files.
Operation Notes
The following restrictions apply toFRENAME:
* Directories cannot be renamed.
* Lockwords cannot be assigned to hierarchical directories.
* Files cannot be renamed across volume sets.
* Files with KSAM/3000, RIO, and CIR file types may only be assigned
names in the MPE name space.
If a file without an ACD is renamed from an MPE group to a directory
(although not within the same account), an ACD is automatically assigned
to the file.
All errors will set the condition codes to CCL.
(KSAM) Although FRENAME will work on CM KSAM files, it renders them
unuseable until they are reassigned their original names. To rename a CM
KSAM file, use the KSAMUTIL RENAME command.
Condition Codes
CCE (2) Request granted.
CCG (0) Not returned.
CCL (1) Request denied. An error occurred.
Related Information
Intrinsics None
Commands None
Manuals Accessing Files Programmer's Guide (32650-90017)
MPE/iX 5.0 Documentation