Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-177
FILENAME_EDIT_ Procedure
Considerations
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. The
following 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 the
following 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 FE13 FEBADNAME
error will result.
Examples
The following table shows some possible combinations of input values for calls to
FILENAME_EDIT_ and the resulting output values. Note that “suffix” refers to the
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.