Specifying MVS data set names in the shell environment

Several utilities allow the user to specify an MVS™ data set name in place of a z/OS® UNIX file name. See Utilities that support MVS data set names for the current list. This topic describes the syntax for specifying an MVS data set name. Because MVS data set names generally contain single quotation marks and parentheses, which can be misinterpreted by the shell, care needs to be taken to correctly escape these characters.

What follows are general rules for specifying MVS data set names. Consult the description of each utility for more specific instructions or exceptions.
  • MVS data sets are distinguished from z/OS UNIX files by preceding them with two slashes (//). For example, to specify the MVS data set name PROGRAM.OUTPUT, enter:
    //PROGRAM.OUTPUT
    If the double slashes were not used, the name would be interpreted as the file path name PROGRAM.OUTPUT in the current working directory.
  • Unless a utility specifically provides an option to disable uppercasing, the default approach is to make all MVS data set names uppercase before processing. For example, the following are all equivalent methods for specifying the MVS data set PROGRAM.OUTPUT:
    //program.output
    //ProGram.OutPut
    //PROGRAM.OUTPUT
  • The single quotation mark (') and parentheses (()) metacharacters are typically used to specify fully qualified MVS names and PDS/PDSEs, respectively. These characters, however, are metacharacters that will be incorrectly interpreted by the shell. To prevent this situation, they must be escaped. The simplest approach is to place the entire name within double quotation marks ("). Alternatively, these characters can be escaped by preceding each with a backslash (\). For example:
    To specify the fully qualified MVS data set 'SMITH.PROGRAM.OUTPUT':
    "//'smith.program.output'"
     //\'smith.program.output\'
    To specify the fully qualified partitioned data set 'SMITH.PROGRAM.SOURCE(FILE1)':
    "//'smith.program.source(file1)'"
     //\'smith.program.source\(file1\)\'
    To specify the non-qualified partitioned data set PROGRAM.SOURCE(FILE1):
    "//program.source(file1)"
     //smith.program.source\(file1\)
Restrictions:
  • Shell commands that support MVS data sets (such as cp, mv, pax, tar, and c89) cannot process data sets that are defined as DSNTYPE=LARGE due to the restriction imposed by fopen().
  • In order to use the //DD:DDNAME format, the dataset must be allocated in the address space that the following command will run in. However, in the login shell environment, the user cannot use the //DD:DDNAME format due to the restriction that the address space of the allocated dataset is not always the same as the running command.