mvstmp - Generate a valid MVS dataset name suitable for use as a temporary dataset.


mvstmp [-cdhv] [PREFIX]

  Runs a test to verify if the current user is able to write to a
  temporary dataset using the provided or default PREFIX.

    Print out debug messages.

    Display syntax help.

    Print out verbose command information.


    Overrides the prefix default value, which is the current user name.


Generate a name suitable for use as a z/OS dataset name and write the name to stdout. No dataset is actually created - this utility just generates a name.

If the PREFIX argument or TMPHLQ environment variables are used, the value provided must adhere to the following rules:

  • It must be a maximum of 17 characters long.
  • It must follow z/OS dataset naming rules.
  • It may contain 0 or more periods. For example the following prefixes are valid: ZOAU, ZOAU.PREFIX, ZOAU.PREFIX.NAME

The name is of the format: <PREFIX>.<PROCESS>.<TIMESTAMP>.<COUNTER>

The value of the components of the name are as follows:

<PREFIX> Defaults to current user name if no prefix is specified. Overrides TMPHLQ environment variable if provided.

<PROCESS> P followed by the 7 low order digits of the process ID of the mvstmp program instance.

<TIMESTAMP> T followed by the 7 low order digits of the microseconds component of the current time of day.

<COUNTER> C followed by 7 zeros.

For example: PREFIX00.Pnnnnnnn.Tnnnnnnn.C0000000


Generate a temporary dataset name with a high-level qualifier (HLQ) of TEST:

mvstmp TEST


    mvstmp completed without error.

    mvstmp failed. See error messages for details.