Guardian Procedure Calls Reference Manual

NOTE: The sequence number is mandatory for unnamed processes. Do not remove the
sequence number from an unnamed process file name because a fatal error will result.
Replace name, that is, the alphanumeric section that begins with a question mark and ends at the first
colon or period.
4
The default value is 0.
You should specify a nonzero value for subpart only when level is 0 and bits 14 and 15
(extract prefix and extract suffix) of options are 0.
Returned Value
INT
A file-system error code that indicates the outcome of the call.
Considerations
CAUTION: Passing an invalid file name or file-name pattern to this procedure can result in a
trap, a signal, or data corruption. To verify that a file name or file-name pattern is valid, use the
FILENAME_SCAN_ procedure.
The value of piece that you supply to FILENAME_EDIT_ should include special characters
that are part of the file name or file-name pattern (the characters $ \ # * ?) but not the leading
or trailing separators (the characters . :). When you supply multiple parts in piece, you should
include separators between the parts. These strings are examples of valid values for piece:
$S
\MYSYS
$DISK.*
$DISK.#TFILE
You can request that a portion be deleted from filename by specifying that the length of
piece be zero. When the portion is removed, any unneeded adjacent separators are also
removed. A section can be removed from the middle of a file name, but the result (as with
any modification) must be a valid file name or file-name pattern.
When filename contains a partially qualified file name or file-name pattern, the contents of
your =_DEFAULTS DEFINE are used to resolve it. This affects the operation of FILENAME_EDIT_
in two ways. First, it is possible to replace name parts that are not present in the input; one
is replacing the implicit value with an explicit one. Second, an implicit name part might appear
in the output, but this occurs only when it is necessary in order to form a valid file name. See
Examples.
You can use the level parameter to specify any part that is present in filename or implied
through the =_DEFAULTS DEFINE. Generally, level cannot specify nonexistent right-hand
(that is, higher) levels; the exception is that it can specify the level one greater than the highest
level present in filename. Replacement of this part effectively appends piece to filename
using a period (.) as the separator.
If the sequence number is removed from an unnamed file, an FEBADNAME (13) error is
returned.
FILENAME_EDIT_ Procedure 571