Guardian Programmer's Guide

Table Of Contents
Manipulating File Names
Guardian Programmer’s Guide 421922-014
13 - 2
Identifying Portions of File Names
Identifying Portions of File Names
Many of the procedures described in this section need to identify portions of file names
or names of other entities such as nodes, volumes, and subvolumes. For example, if
you want to change a subvolume name in a permanent disk-file name, you need a way
of specifying to a procedure that the string you supply is to replace the subvolume
name.
To describe how you identify portions of entity names to the procedures described
here, the following paragraphs introduce some terminology.
Defining a File-Name “Part”
A file-name part represents a portion of a file name either between two periods,
before the first period, or after the last period. Node name, file ID, process name,
process qualifier, and device name are all examples of file-name parts.
To identify a part of a file name, many procedures take a level parameter. The level
identifies the position of the part in the file name. The level can have a value between
-1 and +2 as follows:
Some examples of file names are listed below. The examples indicate the level
number of each part of the file name:
-1 Identifies a node name.
0 Identifies that part of a file name that immediately follows the node name in a
fully qualified file name; for example, a device name, volume name, or
unqualified portion of a process name. This part often has a dollar sign ($) as
the first character.
1 Identifies the first qualifier. For a disk file, this is the subvolume name. For a
process, this is the first process qualifier.
2 Identifies the second qualifier. For a disk file, this is the file ID. For a process
file, this is the second process qualifier.
Fully qualified permanent disk-file name: \SYSA.$OURVOL.MYSUB.PROGA
Level: -1 0 2
Partially qualified disk file: PROGA
Level: 2
Named process file name: $SERV.#Q1
Level: 0 1
Unnamed process descriptor: \SYSA.$:15:132:3
Level: -1 0
Printer file: $LP1
Level: 0