Wednesday, July 1, 2015

An overview of SMS parameters: STORCLAS,DATACLAS,MGMTCLAS,RECORG

1. The STORCLAS Parameter:
STORCLAS is a keyword parameter. It is used to assign a data set to an SMS defined class. 
These parameters discused below have significance only if SMS is active, otherwise it is ignored. 
Here’s the syntax: 
STORCLAS = class
Where class is an installation defined name and can be one to eight characters long. Use of this parameter results in the data set defined in the DD statement within that job being SMS-managed. The VOLUME and UNIT parameters can be omitted, since these values are now SMS supplied.
As we can see in the below example, VOLUME and UNIT parameters are omitted. These parameters will be installation defined for the class SMS1.
//JOB1 JOB (A123), ‘Ryan’
//STEP1 EXEC PGM=PROGRAM1
//DD1 DD DSN=myid.test.dataset1,
// DISP=(NEW, CATLG, DELETE),
// SPACE=(CYL, (1,1), RLSE),
// LRECL=80,
// RECFM=FB,
// STORCLAS=SMS1 

2. The DATACLAS Parameter:
DATACLAS is a keyword parameter. It is used to define any or all of the following parameters for a data set.(Marked in blue)
LRECL, RECORG , RECFM,  RETPD or EXPDT ,VOLCOUNT (coded on the VOL parameter) , 
SPACE , AVGREC
 Volcount is coded on VOL parameter. It is used to specify the number of tape volumes that can be mounted when a tape data set is being created or expanded.
For SMS managed VSAM data sets, DATACLAS can be used to define the following parameters: CISIZE, IMBED ,REPLICATE, SHAREOPTIONS ,FREESPACE 

Here’s the syntax of the DATACLAS parameter:
DATACLAS = class
Class is installation defined with predefined values for any of the above parameters

Suppose a class named GENERAL contains the following definitions:
SPACE = (CYL, (1,1), RLSE),
DCB= (RECFM=FB, LRECL=80)
My job uses the Class GENERAL in JCL

//JOB1 JOB (A123), ‘Ryan’ /
/STEP1 EXEC PGM=PROGRAM1
//DD1 DD DSN=myid.test.dataset1,
// DISP=NEW, CATLG, DELETE),
// UNIT=SYSDA,
// DATACLAS=GENERAL 

3. The MGMTCLAS Parameter 
This parameter is used to provide a management class for the associated data set coded in the DD statement. A management class is used to control the migration of data sets, the frequency of back ups, the number of backups versions, and the retention criteria of backup versions.
Here’s the syntax:
MGMTCLAS = class
It can be one to eight characters long. Parameters defined for this class can not be overridden. Example:
//JOB1 JOB (A123), 'Ryan’
//STEP1 EXEC PGM=PROGRAM1
//DD1 DD DSN=myid.test.dataset2
// DISP=(NEW, CATLG, DELETE),
// DATACLAS=GENERAL,
// MGMTCLAS=ARCHIVE

4. The LIKE Parameter:
 This parameter is used to copy attributes from an existing cataloged data set to a new data set. The following attributes can be copied over: SPACE RECFM AVGREC LRECL

Here’s the syntax:
LIKE = model.dataset
Where model.dataset identifies the name of the model data set.
Example:

//JOB1 JOB (A123), ‘Ryan’
//STEP1 EXEC PGM=PROGRAM1
//DD1 DD DSN=myid.test.dataset3,
// DISP=(NEW, CATLG, DELETE),
// LIKE=TEST.MODEL
 In this example, the  attributes of the data set TEST.MODEL is copied to the new data set called TEST.DATA2.

No comments:

Post a Comment