MainframeMaster

JCL Tutorial

MGMTCLAS: JCL Management Class Parameter

Progress0 of 0 lessons

What is MGMTCLAS?

MGMTCLAS (Management Class) is a JCL parameter that assigns a Storage Management Subsystem (SMS) management class to a dataset. Management classes control dataset migration, backup, and retention characteristics.

By specifying a MGMTCLAS, you allow the system to automatically manage a dataset's lifecycle based on predefined policies, eliminating the need to specify detailed management attributes directly in the JCL.

Syntax and Usage

Basic Syntax

jcl
1
2
//ddname DD DSNAME=dataset.name,DISP=(NEW,CATLG,DELETE), // MGMTCLAS=management-class-name

The MGMTCLAS parameter is specified on a DD statement, along with other dataset attributes. The management-class-name must be 1-8 characters and must be defined in the active SMS configuration.

Example with MGMTCLAS

jcl
1
2
3
4
5
6
//STEP010 EXEC PGM=IEFBR14 //SYSPRINT DD SYSOUT=* //NEWDATA DD DSN=USER.TEST.DATA, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,5)), // MGMTCLAS=STANDARD

In this example, the new dataset USER.TEST.DATA is assigned the STANDARD management class, which would control how the dataset is backed up, migrated, and eventually deleted by the system.

Management Class Properties

A management class defines various dataset management attributes that affect how the system handles dataset migration, backup, and retention. The attributes are defined by the storage administrator and can include:

Migration Attributes

  • Primary Days Non-usage: Number of days since last access before migration to level 1 storage
  • Level 1 Days Non-usage: Number of days before migration from level 1 to level 2 storage
  • Command or Auto Migrate: Whether migration can be initiated by command, automatically, or both

Backup Attributes

  • Backup Frequency: How often the dataset should be backed up
  • Number of Backup Versions: How many versions to retain for recovery
  • Retain Days Only Backup Version: How long to keep the only backup version
  • Retain Days Extra Backup Versions: How long to keep additional backup versions

Retention Attributes

  • Expire after Days Non-usage: Number of days since last access before dataset expiration
  • Expire after Date/Days: Absolute expiration date or number of days after creation
  • Partial Release: Whether unused space can be released after dataset closure

The specific attributes and their values are defined by the storage administrator and may vary between installations. Consult your system documentation or storage administrator for available management classes and their attributes.

Common Management Class Names

While management class names are installation-specific, there are some common naming conventions:

Management ClassTypical UsageCommon Attributes
STANDARDGeneral-purpose datasets
  • Migrate after 30 days
  • 3 backup versions
  • Expire after 90 days non-usage
NOBACKUPTemporary or reproducible datasets
  • No automatic backups
  • Migrate after 1 day
  • Expire after 7 days
CRITICALMission-critical datasets
  • Daily backups
  • 5+ backup versions
  • No automatic migration
GDGCLASSGeneration Data Groups
  • Migrate older generations quickly
  • Limited backup versions
  • Auto-expire based on GDG limit
ARCHIVELong-term archive datasets
  • Immediate migration to tape
  • Multiple backup versions
  • No automatic expiration

Note: The actual management class names and their attributes are defined by the storage administrator and will vary between installations. The examples above illustrate common patterns but may not match your specific environment.

MGMTCLAS Usage Scenarios

Here are some common scenarios where specific management classes might be used:

Scenario 1: Critical Financial Data

Financial datasets with legal retention requirements need frequent backups and extended retention:

jcl
1
2
3
4
//FINDATA DD DSN=ACCT.FINANCIAL.DATA, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(100,50)), // MGMTCLAS=CRITICAL

The CRITICAL management class ensures multiple backups are maintained and the dataset is not migrated to slower storage, keeping it readily available for financial reporting.

Scenario 2: Temporary Processing Data

Temporary datasets that are only needed during job processing:

jcl
1
2
3
4
//TEMPDATA DD DSN=USER.TEMP.PROCESS.DATA, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,2)), // MGMTCLAS=NOBACKUP

The NOBACKUP management class prevents system resources from being wasted on backing up temporary data, and ensures it's automatically cleaned up after a short period.

Scenario 3: Historical Archive

Data that must be retained for long periods but is rarely accessed:

jcl
1
2
3
4
//ARCHDATA DD DSN=HIST.ARCHIVE.DATA.Y2023, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(200,100)), // MGMTCLAS=ARCHIVE

The ARCHIVE management class quickly migrates the data to tape or other archival storage, but maintains its catalog entry and ensures it can be recalled if needed.

Overriding and Default Management Classes

There are several ways a management class can be assigned to a dataset:

Assignment Methods (in order of precedence)

  1. Explicit JCL Specification: Using the MGMTCLAS parameter (highest precedence)
  2. Data Class Default: If DATACLAS is specified, it may include a default MGMTCLAS
  3. ACS Routines: Automatic Class Selection routines can assign a management class based on dataset attributes
  4. Installation Default: The system-wide default if no other management class is assigned

Determining the Assigned Management Class

To check which management class is assigned to a dataset, you can use the ISMF (Interactive Storage Management Facility) panels or the LISTCAT command:

jcl
1
2
3
4
5
//LISTCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENTRIES(dataset.name) ALL /*

The LISTCAT output will show the assigned management class in the MANAGEMENT-CLASS field.

Best Practices for MGMTCLAS

Recommendations

  • Consult with your storage administrator to understand available management classes and their attributes
  • Use explicit MGMTCLAS specifications for critical datasets to ensure consistent management policies
  • Consider the dataset's lifecycle when selecting a management class:
    • How long will it be needed?
    • How frequently will it be accessed?
    • What are the backup requirements?
  • Document management class usage in your JCL procedures to help maintainers understand dataset management policies
  • For temporary datasets, use management classes that minimize backup overhead and enable quick cleanup
  • For datasets with regulatory retention requirements, ensure the management class meets those requirements

MGMTCLAS Exercises

Exercise 1: Creating Datasets with Different Management Classes

Write JCL to create three datasets with different management classes based on these requirements:

  1. A critical financial dataset that needs frequent backups and no migration
  2. A temporary dataset that will be needed for only 7 days and doesn't require backups
  3. A historical archive dataset that should be migrated to tape but retained indefinitely

Exercise 2: Identifying Management Classes

Write JCL to list the management classes assigned to the following datasets in your system:

  1. Your system's JCL procedure library (PROCLIB)
  2. A dataset you created recently
  3. A system log dataset

Review the LISTCAT output to determine if the management classes align with the dataset usage.

Frequently Asked Questions

Can I change the management class of an existing dataset?

You cannot directly change the management class of an existing dataset through JCL. To change the management class, you must either use the IDCAMS ALTER command, the ISMF panels, or create a new dataset with the desired management class and copy the data to it.

What happens if I specify a management class that doesn't exist?

If you specify a management class that is not defined in the active SMS configuration, the system will either reject the job with an error message or fall back to a default management class, depending on your installation's SMS configuration.

How do I know which management classes are available in my system?

You can view available management classes through the ISMF panels in TSO/ISPF. Usually, this information is also documented in your installation's standards guide. Alternatively, you can consult with your storage administrator.

Does MGMTCLAS affect where my dataset is stored?

No, MGMTCLAS does not directly control where a dataset is initially allocated. Storage location is determined by the storage class (STORCLAS) and storage groups defined in SMS. MGMTCLAS only affects how the dataset is managed after allocation, such as migration and backup policies.

Can I use MGMTCLAS with non-SMS-managed datasets?

No, the MGMTCLAS parameter only applies to SMS-managed datasets. For non-SMS-managed datasets, you must manage migration and backup through other means, such as explicit HSM commands or custom procedures.

Test Your Knowledge

1. What aspects of dataset management does MGMTCLAS control?

  • Initial allocation and storage location
  • Migration, backup, and retention policies
  • Record format and block size
  • Access permissions and security

2. Which of the following would take precedence for assigning a management class?

  • Installation default
  • ACS routine selection
  • Data class default
  • Explicit MGMTCLAS in JCL

3. If you need to change the management class of an existing dataset, what must you do?

  • Re-specify MGMTCLAS when accessing the dataset
  • Use IDCAMS ALTER command or ISMF panels
  • Add the MGMTCLAS parameter to the next job that uses the dataset
  • Change the management class in the storage group definition

4. Which management class would be most appropriate for temporary datasets that don't need to be backed up?

  • STANDARD
  • CRITICAL
  • NOBACKUP
  • ARCHIVE

5. Which command can be used to check the management class assigned to a dataset?

  • LISTDS
  • LISTCAT
  • HLIST
  • LISTVTOC