SAMPLIB member CBRHMC provides a management class ACS routine for
OAM objects.
/*********************************************************************/
/* */
/* $SEG(CBRHMC) COMP(OSMC) PROD(OAM): */
/* */
/* OAM Sample Management Class ACS Routine */
/* */
/* FUNCTION: SUPPLY A MANAGEMENT CLASS FOR OAM OBJECTS */
/* */
/* OPERATION: Supply a management class for the following */
/* environments: */
/* */
/* STORE - Assign an initial management class based */
/* on collection name and/or object name */
/* and/or storage class. */
/* CHANGE - Validate a request to change the */
/* management class for an object. */
/* CTRANS - The object is moved in the hierarchy */
/* according to its previous management */
/* class. */
/* */
/* NOTES: In this implementation, the collection name is used as */
/* the basis for determining whether explicit values will */
/* be considered. This approach and all of the processing */
/* indicated below is one of many differing possibilities */
/* and is only for purposes of illustration to demonstrate*/
/* the types of processing that can be accomplished in an */
/* ACS routine. Actual implementations will vary. */
/* */
/* ASSUMPTIONS: */
/* Collection name format */
/* CLLCT0mn */
/* where m = 0 or 1 (0 indicates that explicit values will be */
/* ignored, 1 indicates that explicit values */
/* are considered in some cases and may */
/* result in an override) */
/* where n = 0 - 9 */
/* Object name format - has 5 levels as follows: */
/* xxxx.xxx.xxxxxxxx.xxxxxxx.xxx */
/* Valid storage classes: */
/* DB2DASD - DASD */
/* OLIBRARY - optical */
/* TAPESC - Tape */
/* Valid management classes: */
/* MAGONLY - 30 days on DASD, then expire */
/* MAG30D - 30 days on DASD, then transition */
/* MAG30LIB - 6 months on optical, then transition */
/* TAPSEVEN - 7 years on tape, then expire */
/* OPT6D - 0 days on DASD, then transition */
/* OPT6LIB - 6 months on optical, then transition */
/* OPTTAPE - 7 years on tape, the expire */
/* */
/* CHANGE ACTIVITY: */
/* $L0=JDP3227 320 890601 TUCKSG: Initial Release */
/* $L1=JDP3331 331 910614 TUCKSG: Added sample definitions */
/* $00=OW00750 120 931221 TUCSMC: updated to add Tape samples */
/* */
/*********************************************************************/
/* L O G I C O V E R V I E W */
/* */
/* If STORE environment */
/* | If object name not specified (i.e. this is an invocation for */
/* | the entire collection) */
/* | | Select */
/* | | When the collection is in the set that we are defining to */
/* | | allow overrides */
/* | | | Select */
/* | | | When the storage class is 'DB2DASD' (i.e. DASD) */
/* | | | | If management class specified is not 'MAGONLY' */
/* | | | | | Set the management class to 'MAG30D' */
/* | | | | Endif */
/* | | | When the storage class is 'OLIBRARY' (i.e. Optical) */
/* | | | | Set the management class to 'OPT6D' */
/* | | | Otherwise */
/* | | | | Set error code */
/* | | | End */
/* | | When the collection is in the set that we are defining to */
/* | | not allow overrides */
/* | | | Select */
/* | | | When the storage class is 'DB2DASD' (i.e. DASD) */
/* | | | | Set the management class to 'MAG30D' */
/* | | | When the storage class is 'OLIBRARY' (i.e. Optical) */
/* | | | | Set the management class to 'OPT6D' */
/* | | | Otherwise */
/* | | | | Set error code */
/* | | | End */
/* | | Otherwise */
/* | | | Set error code */
/* | | End */
/* | Else (an object name was specified) */
/* | | Select */
/* | | When the collection is in the set that we are defining to */
/* | | allow overrides */
/* | | | If the object name has exactly 5 levels and the 5th */
/* | | | level indicates that the object may have the management */
/* | | | class overridden and the storage class is 'DB2DASD' */
/* | | | | If management class specified is not 'MAGONLY' */
/* | | | | | Set the management class to 'MAG30D' */
/* | | | | Endif */
/* | | | Else */
/* | | | | Select */
/* | | | | When the storage class is 'DB2DASD' (i.e. DASD) */
/* | | | | | Set the management class to 'MAG30D' */
/* | | | | When the storage class is 'OLIBRARY' (i.e. Optical) */
/* | | | | | Set the management class to 'OPT6D' */
/* | | | | Otherwise */
/* | | | | | Set error code */
/* | | | | End */
/* | | | Endif */
/* | | When the collection is in the set that we are defining to */
/* | | not allow overrides */
/* | | | Select */
/* | | | When the storage class is 'DB2DASD' (i.e. DASD) */
/* | | | | Set the management class to 'MAG30D' */
/* | | | When the storage class is 'OLIBRARY' (i.e. Optical) */
/* | | | | Set the management class to 'OPT6D' */
/* | | | Otherwise */
/* | | | | Set error code */
/* | | | End */
/* | | Otherwise */
/* | | | Set error code */
/* | | End */
/* | Endif (object name specified) */
/* Endif (STORE environment) */
/* */
/* */
/* If CHANGE environment */
/* | Select */
/* | When storage class is 'DB2DASD' */
/* | | If management class is not 'MAGONLY' or 'MAG30D' */
/* | | | Set management class to 'MAG30D' */
/* | | Endif */
/* | When storage class is 'OLIBRARY' */
/* | | Set management class to 'OPT6LIB' */
/* | When storage class is 'TAPESC' */
/* | | Set management class to 'OPTTAPE' */
/* | Otherwise */
/* | | Set error code */
/* | End */
/* Endif (CHANGE environment) */
/* */
/* */
/* If CLASS_TRANSITION environment */
/* | Select */
/* | When storage class is 'OLIBRARY' */
/* | | Select */
/* | | When management class is 'OPT6D' */
/* | | | Set management class to 'OPT6LIB' */
/* | | When management class is 'MAG30D' */
/* | | | Set management class to 'MAG30LIB' */
/* | | Otherwise */
/* | | | Set error code */
/* | | End */
/* | When storage class is 'TAPESC' */
/* | | Select */
/* | | When management class is 'OPT6LIB' */
/* | | | Set management class to 'OPTTAPE' */
/* | | When management class is 'MAG30LIB' */
/* | | | Set management class to 'TAPSEVEN' */
/* | | Otherwise */
/* | | | Set error code */
/* | | End */
/* | Otherwise */
/* | | Set error code */
/* | End */
/* Endif */
/*********************************************************************/
/* M A N A G E M E N T C L A S S D E F I N I T I O N S */
/* */
/*Relevant */
/*Fields MAGONLY MAG30D MAG30LIB TAPSEVEN OPT6D OPT6LIB OPTTAPE*/
/*--------- ------- ------- -------- -------- ------- ------- -------*/
/*EXPIRE */
/*AFTER */
/*DAYS */
/*NON-USAGE NOLIMIT NOLIMIT NOLIMIT NOLIMIT NOLIMIT NOLIMIT NOLIMIT*/
/* */
/*EXPIRE */
/*AFTER */
/*DATE/DAYS 30 2557 2557 2557 2557 2557 2557 */
/* */
/*MAXIMUM */
/*RETENTION */
/*PERIOD 30 NOLIMIT NOLIMIT NOLIMIT NOLIMIT NOLIMIT NOLIMIT*/
/* */
/*AUTO */
/*BACKUP YES NO NO NO NO YES NO */
/* */
/*TIME */
/*SINCE */
/*CREATION */
/*YEARS -- -- -- 07 -- -- 07 */
/* */
/*TIME */
/*SINCE */
/*CREATION */
/*MONTHS -- -- 06 -- -- 06 -- */
/* */
/*TIME */
/*SINCE */
/*CREATION */
/*DAYS -- 30 -- -- 00 -- -- */
/* */
/*********************************************************************/
PROC MGMTCLAS /* Select an Management class */
FILTLIST BLANK INCLUDE (' ','')
/*********************************************************************/
/* STORE */
/*********************************************************************/
IF &ACSENVIR = 'STORE' THEN /* Object is being stored */
IF &MEMN = &BLANK THEN /* If the object name is not
specified (i.e. indicating
an invocation for the entire
collection) */
SELECT
WHEN (&DSN = 'CLLCT010' | &DSN = 'CLLCT011' | &DSN = 'CLLCT012'
| &DSN = 'CLLCT013' | &DSN = 'CLLCT014' | &DSN = 'CLLCT015'
| &DSN = 'CLLCT016' | &DSN = 'CLLCT017' | &DSN = 'CLLCT018'
| &DSN = 'CLLCT019') /* For the collections which
allow overrides */
SELECT (&STORCLAS)
WHEN ('DB2DASD') /* If current storage class
indicates that object is on
DASD */
IF &MGMTCLAS ¬= 'MAGONLY' THEN /* If the specified management
class value is not a valid
override */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SET &MGMTCLAS = 'OPT6D' /* Set management class to
indicate the optical
management specifications */
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(20) /* Indicate that an error
occurred */
END
WHEN (&DSN = 'CLLCT000' | &DSN = 'CLLCT001' | &DSN = 'CLLCT002'
| &DSN = 'CLLCT003' | &DSN = 'CLLCT004' | &DSN = 'CLLCT005'
| &DSN = 'CLLCT006' | &DSN = 'CLLCT007' | &DSN = 'CLLCT008'
| &DSN = 'CLLCT009') /* For the collections which
do not allow overrides */
SELECT (&STORCLAS)
WHEN ('DB2DASD') /* If current storage class
indicates that object is on
DASD */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SET &MGMTCLAS = 'OPT6D' /* Set management class to
indicate the optical
management specifications */
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(21) /* Indicate that an error
occurred */
END
OTHERWISE /* Otherwise the collection name
is invalid */
EXIT CODE(22) /* Indicate that an error
occurred */
END /* Select */
ELSE /* If the object name is
specified (i.e. indicating
an invocation for the
specific collection) */
SELECT
WHEN (&DSN = 'CLLCT010' | &DSN = 'CLLCT011' | &DSN = 'CLLCT012'
| &DSN = 'CLLCT013' | &DSN = 'CLLCT014' | &DSN = 'CLLCT015'
| &DSN = 'CLLCT016' | &DSN = 'CLLCT017' | &DSN = 'CLLCT018'
| &DSN = 'CLLCT019') /* For the collections which
allow overrides */
IF &MEMN = *.*.*.*.IAX AND
&STORCLAS = 'DB2DASD' THEN /* If the object name contains
a value indicating that this
object should be treated
differently than the
other objects in these
collections (i.e. only
specific objects within
these collections allow
overrides) and the storage
class indicates that the
object is on DASD */
IF &MGMTCLAS ¬= 'MAGONLY' THEN /* If the specified management
class value is not a valid
override */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
ELSE
DO
END
ELSE /* Otherwise there is nothing
special about this object
name (i.e. so overrides
will not be allowed) */
SELECT (&STORCLAS)
WHEN ('DB2DASD') /* If current storage class
indicates that object is on
DASD */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SET &MGMTCLAS = 'OPT6D' /* Set management class to
indicate the optical
management specifications */
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(23) /* Indicate that an error
occurred */
END
WHEN (&DSN = 'CLLCT000' | &DSN = 'CLLCT001' | &DSN = 'CLLCT002'
| &DSN = 'CLLCT003' | &DSN = 'CLLCT004' | &DSN = 'CLLCT005'
| &DSN = 'CLLCT006' | &DSN = 'CLLCT007' | &DSN = 'CLLCT008'
| &DSN = 'CLLCT009') /* For the collections which
do not allow overrides */
SELECT (&STORCLAS)
WHEN ('DB2DASD') /* If current storage class
indicates that object is on
DASD */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SET &MGMTCLAS = 'OPT6D' /* Set management class to
indicate the optical
management specifications */
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(24) /* Indicate that an error
occurred */
END
OTHERWISE /* Otherwise the collection name
is invalid */
EXIT CODE(25) /* Indicate that an error
occurred */
END /* Select */
/*********************************************************************/
/* CHANGE */
/*********************************************************************/
IF &ACSENVIR = 'CHANGE' THEN /* Object is being changed */
SELECT (&STORCLAS)
WHEN ('DB2DASD') /* If current storage class
indicates that object is on
DASD */
IF &MGMTCLAS ¬= 'MAGONLY' AND
&MGMTCLAS ¬= 'MAG30D' THEN /* If the specified management
class value is not a valid
override */
SET &MGMTCLAS = 'MAG30D' /* Set management class to
indicate the DASD management
specifications */
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SET &MGMTCLAS = 'OPT6LIB' /* Set management class to
indicate the optical
management specifications */
WHEN ('TAPESC') /* If current storage class
indicates that object is on
tape */
SET &MGMTCLAS = 'OPTTAPE' /* Set management class to
indicate the tape
management specifications */
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(26) /* Indicate that an error
occurred */
END
/*********************************************************************/
/* CLASS TRANSITION */
/*********************************************************************/
IF &ACSENVIR = 'CTRANS' THEN /* Object is being processed
as a result of a class
transition */
SELECT (&STORCLAS)
WHEN ('OLIBRARY') /* If current storage class
indicates that object is on
optical */
SELECT (&MGMTCLAS)
WHEN ('OPT6D') /* If current management class
indicates optical management
specifications */
SET &MGMTCLAS = 'OPT6LIB' /* Set management class to
indicate the appropriate
optical management
specifications */
WHEN ('MAG30D') /* If current management class
indicates DASD management
specifications */
SET &MGMTCLAS = 'MAG30LIB' /* Set management class to
indicate the appropriate
optical management
specifications */
OTHERWISE /* Otherwise the management
class is invalid */
EXIT CODE(27) /* Indicate that an error
occurred */
END
WHEN ('TAPESC') /* If current storage class
indicates that object is on
tape */
SELECT (&MGMTCLAS)
WHEN ('OPT6LIB') /* If current management class
indicates optical management
specifications */
SET &MGMTCLAS = 'OPTTAPE' /* Set management class to
indicate the appropriate
tape management
specifications */
WHEN ('MAG30LIB') /* If current management class
indicates optical management
specifications */
SET &MGMTCLAS = 'TAPSEVEN' /* Set management class to
indicate the appropriate
tape management
specifications */
OTHERWISE /* Otherwise the management
class is invalid */
EXIT CODE(28) /* Indicate that an error
occurred */
END
OTHERWISE /* Otherwise the storage class
is invalid */
EXIT CODE(29) /* Indicate that an error
occurred */
END
END