z/OS concepts
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF

How are data sets named?

z/OS concepts

When you allocate a new data set, you must give the data set a unique name.

A data set name can be one name segment, or a series of joined name segments. Each name segment represents a level of qualification. For example, the data set name VERA.LUZ.DATA is composed of three name segments. The first name on the left is called the high-level qualifier (HLQ), the last name on the right is the lowest-level qualifier (LLQ).

Segments or qualifiers are limited to eight characters, the first of which must be alphabetic (A to Z) or special (# @ $). The remaining seven characters are either alphabetic, numeric (0 - 9), special, a hyphen (-). Name segments are separated by a period (.).

Including all name segments and periods, the length of the data set name must not exceed 44 characters. Thus, a maximum of 22 name segments can make up a data set name.

For example, the following names are not valid data set names:

  • Name with a qualifier that is longer than eight characters (HLQ.ABCDEFGHI.XYZ)
  • Name containing two successive periods (HLQ..ABC)
  • Name that ends with a period (HLQ.ABC.)
  • Name that contains a qualifier that does not start with an alphabetic or special character (HLQ.123.XYZ)

The HLQ for a user's data sets is typically controlled by the security system. There are a number of conventions for the remainder of the name. These are conventions, not rules, but are widely used. They include the following:

  • The letters LIB somewhere in the name indicate that the data set is a library. The letters PDS are a lesser-used alternative for this convention.
  • The letters CNTL, JCL, or JOB somewhere in the name typically indicate the data set contains JCL (but might not be exclusively devoted to JCL).
  • The letters LOAD, LOADLIB, or LINKLIB in the name indicate that the data set contains executables. (A library with z/OS® executable modules must be devoted solely to executable modules.)
  • The letters PROC, PRC, or PROCLIB indicate a library of JCL procedures.
  • Various combinations are used to indicate source code for a specific language, for example COBOL, Assembler, FORTRAN, PL/I, JAVA, C, or C++.
  • A portion of a data set name may indicate a specific project, such as PAYROLL.
  • Using too many qualifiers is considered poor practice. For example, the following name is a valid data set name (upper case, does not exceed 44 bytes, no special characters) but it is not very meaningful.

    A good practice is for a data set name to contain three or four qualifiers.

Copyright IBM Corporation 1990, 2010