File Names, Titles, and Directories

Each file has a unique name that distinguishes it from every other file. A file name consists of parts, called nodes, separated by a slash (/). A file name can have from 1 to 12 nodes.

It is not a good idea to create files with names that contain "=" (quoted equal sign) as a <node name constant>. In ADD, ALTER, ARCHIVE, CATALOG, CHANGE, COPY, MOVE, REMOVE, REPLACE, UNWRAP, and WRAP statements, when the last node of a source file name is "=", the system treats it as a directory name.

For example, the COPY statement, COPY *X/"=" TO PACK, copies all files in *X/= to PACK. The REMOVE statement, REMOVE (USER) "=" ON PACK, removes all files under the USER usercode on PACK.

Note: You do not need to enclose a node in quotation marks if the node includes a period. Any file name displayed by the MCP continues to have nodes containing periods surrounded by quotation marks.

Long file names are available if you have set the LONGFILENAMES option of the SYSOPS command. Long file names are similar to traditional file names, except they can have from 1 to 20 nodes and a maximum node size of 215 characters.

If long file names are disabled, the long name constructs are redefined as follows.

If SYSOPS LONGFILENAMES is reset, then . . .

Is equivalent to . . .

<long file name constant>

<file name constant>

<long directory name constant>

<directory name constant>

<long file name>

<file name>

<long file title>

<file title>

<long directory name>

<directory name>

<long directory title>

<directory title>

Not all Unisys software supports long file names. For more information about long file names, refer to the System Operations Guide.

<node name constant>

──┬─<letter>─┬─┬────────────────────────────────────┬──────────────────┤
  ├─<digit>──┘ │ ┌◄────────┬──────┬────────┐        │
  │            │ │         └◄─ & ─┘        │        │
  │            └─┴─ /16\ ─┬─<letter>─────┬─┴────────┤
  │                       ├─<digit>──────┤          │
  │                       ├─<hyphen>─────┤          │
  │                       ├─<period>─────┤          │
  │                       └─<underscore>─┘          │
  │     ┌◄────────────────────────────────────┐     │
  ├─ " ─┴─ /17\ ──<nonquote EBCDIC character>─┴─ " ─┤
  │ ┌◄────────────────── & ─────────────────┐       │
  └─┴─ " ──<nonquote EBCDIC character>── " ─┴───────┘

<long node name constant>

──┬─<letter>─┬─┬─────────────────────────────────────┬─────────────────┤
  ├─<digit>──┘ │ ┌◄────────┬──────┬─────────┐        │
  │            │ │         └◄─ & ─┘         │        │
  │            └─┴─ /214\ ─┬─<letter>─────┬─┴────────┤
  │                        ├─<digit>──────┤          │
  │                        ├─<hyphen>─────┤          │
  │                        ├─<period>─────┤          │
  │                        └─<underscore>─┘          │
  │     ┌◄─────────────────────────────────────┐     │
  ├─ " ─┴─ /215\ ──<nonquote EBCDIC character>─┴─ " ─┤
  │ ┌◄────────────────── & ─────────────────┐        │
  └─┴─ " ──<nonquote EBCDIC character>── " ─┴────────┘

<file name constant>

──┬──────────────────────────────────────┬─────────────────────────────►
  ├─ ( ── <usercode name constant> ── ) ─┤
  └─ * ──────────────────────────────────┘
  ┌◄────────────── / ──────────────┐
►─┴─ /12\ ── <node name constant> ─┴───────────────────────────────────┤

<long file name constant>

──┬──────────────────────────────────────┬─────────────────────────────►
  ├─ ( ── <usercode name constant> ── ) ─┤
  └─ * ──────────────────────────────────┘
  ┌◄───────────────── / ────────────────┐
►─┴─ /20\ ── <long node name constant> ─┴──────────────────────────────┤

<file title constant>

──<file name constant>─┬──────────────────────────────┬────────────────┤
                       └─ ON ──<family name constant>─┘

<directory name constant>

──┬──────────────────────────────────────┬─────────────────────────────►
  ├─ ( ── <usercode name constant> ── ) ─┤
  └─ * ──────────────────────────────────┘
►─┬─────────────────────────────────────────┬─ = ──────────────────────┤
  │ ┌◄────────────────────────────────────┐ │
  └─┴─ /11\ ── <node name constant> ── / ─┴─┘

<long directory name constant>

──┬──────────────────────────────────────┬─────────────────────────────►
  ├─ ( ── <usercode name constant> ── ) ─┤
  └─ * ──────────────────────────────────┘
►─┬──────────────────────────────────────────────┬─ = ─────────────────┤
  │ ┌◄─────────────────────────────────────────┐ │
  └─┴─ /19\ ── <long node name constant> ── / ─┴─┘

<directory title constant>

── <directory name constant> ─┬────────────────────────────────┬───────┤
                              └─ ON ── <family name constant> ─┘

<file name>

                             ┌◄──────────────── / ────────────────┐
──┬────────────────────────┬─┴─ /12\ ─┬─ <node name constant> ──┬─┴────┤
  ├─ ( ── <usercode> ── ) ─┤          └─ # ── <string primary> ─┘
  └─ * ────────────────────┘

<long file name>

──┬────────────────────────┬───────────────────────────────────────────►
  ├─ ( ── <usercode> ── ) ─┤
  └─ * ────────────────────┘
  ┌◄────────────────── / ──────────────────┐
►─┴─ /20\ ─┬─ <long node name constant> ─┬─┴───────────────────────────┤
           └─ # ── <string primary> ─────┘

<file title>

── <file name> ── ON ── <family name> ─────────────────────────────────┤

<long file title>

── <long file name> ── ON ── <family name> ────────────────────────────┤

<universal file name>

──┬─ <interchange name constant> ─┬────────────────────────────────────┤
  └─ # ── <string primary> ───────┘

<universal directory name>

──┬─<interchange name constant>─┬─ /= ────┬────────────────────────────┤
  ├─ # ──<string primary>───────┘         │
  └─ # ──<string primary>─────────────────┘
Note: If the string referenced by <string primary> is terminated with "/=", the "/=" in <universal directory name> cannot be used.

<interchange file name>

──┬─ <interchange name constant> ─┬────────────────────────────────────┤
  └─ # ── <string primary> ───────┘

<interchange name constant>

  ┌◄────────────────────────── & ──────────────────────────┐
──┴─ ' ─┬────────────────────────────────────────────┬─ ' ─┴───────────┤
        │ ┌◄───────────────────────────────────────┐ │
        └─┴─┬─<nonsingle quote EBCDIC character>─┬─┴─┘
            └─ " ────────────────────────────────┘

<directory name>

──┬────────────────────────┬───────────────────────────────────────────►
  ├─ ( ── <usercode> ── ) ─┤
  └─ * ────────────────────┘
►─┬────────────────────────────────────────────┬───────────────────────►
  │ ┌◄───────────────────────────────────────┐ │
  └─┴─ /11\ ─┬─ < name constant> ──────┬─ / ─┴─┘
             └─ # ── <string primary> ─┘
►─── = ────────────────────────────────────────────────────────────────┤

<long directory name>

──┬────────────────────────┬───────────────────────────────────────────►
  ├─ ( ── <usercode> ── ) ─┤
  └─ * ────────────────────┘
►─┬────────────────────────────────────────────────┬───────────────────►
  │ ┌◄───────────────────────────────────────────┐ │
  └─┴─ /19\ ─┬─ <long node name constant> ─┬─ / ─┴─┘
             └─ # ── <string primary> ─────┘
►─── = ────────────────────────────────────────────────────────────────┤

<directory title>

──<directory name>─┬─────────────────────┬─────────────────────────────┤
                   └─ ON ──<family name>─┘

<long directory title>

── <long directory name> ─┬───────────────────────┬────────────────────┤
                          └─ ON ── <family name> ─┘

Explanation

In the node name constant and the long node name constant, the ampersand (&) operator must be on the same line as the preceding text. When the & operator is used to concatenate two or more names in double quotation marks (""), a new node name is created within pair of double quotation marks. If the new concatenated node name contains more than 215 characters (not counting the double quotation marks), an error message is issued.

In the interchange name constant, the ampersand (&) operator must be on the same line as the preceding text. When the & operator is used to concatenate two or more names in single quotation marks ('), a new name is created within a pair of single quotation marks. If the new concatenated name contains more than 250 characters (not counting the single quotation marks), an error message is issued.

If a usercode is not specified for a name or title and the task is running under a usercode, the file or directory will first be looked for under the usercode of the task and, if not found, will then be looked for without a usercode.

Note: When you use the ALTER, CATALOG, CHANGE, DELETE, MODIFY, REMOVE and SECURITY statements, only the usercode of the task is searched.

If a name or title is preceded by the optional asterisk (*), it indicates that the search for the file or directory is to be done as if the task were not running under a usercode.

As an alternate syntax for indicating a file associated with a usercode, instead of preceding the file name with the usercode parentheses, you can precede the file name with *USERCODE/<usercode>. You can use this alternate form when you refer to either a file or to a directory of files under the specified usercode. The directory *USERCODE/= refers to all usercoded files on a given family.

Examples

?BEGIN JOB;
  USERCODE=UC;
  FAMILY DISK = PRIMARY OTHERWISE ALTERNATE;
  RUN OBJECT/TEST;
?END JOB.

In this example, the file OBJECT/TEST will be searched for under different file titles and family names in the following order:

  • (UC)OBJECT/TEST on the primary family

  • *OBJECT/TEST on the primary family

  • (UC)OBJECT/TEST on the alternate family

  • *OBJECT/TEST on the alternate family

The system will use the first file it finds.

If OBJECT/TEST were changed to *OBJECT/TEST in this example, only the file titles and family names given in items 2 and 4 in the preceding list would be used in the search.

The statement COPY *= FROM T1(KIND=TAPE) copies all of the files from the tape T1, whether or not their titles have usercodes, because the usercode of the task is not used to precede the file names.

An interchange file name is a string of up to 250 characters surrounded by single quotation marks ('). A single quotation mark can be embedded in the string by including a pair of adjacent single quotation marks.

The following CHANGE statement changes the first node of each filename in *X/= into a usercode:

CHANGE *X/= TO *USERCODE/=

For example, the previous statement would change file *X/A/B to (A)B. Note that a job must have privileged status to place files under a usercode different from that of the job itself.