Sample ACS routine

Figure 1 illustrates some techniques for using the ACS routines.

Figure 1. Production ACS Routine for Storage Class
PROC STORCLAS

/******************************************************************************************/
/* THIS IS THE PRODUCTION SELECTION SPECIFICATION FOR SETTING STORCLAS                    */
/******************************************************************************************/

FILTLIST DBVOLS INCLUDE(IMS*,DB2*)                                /* ALL DATABASE VOLUMES */
                EXCLUDE('IMS053','DB2007')

FILTLIST DBJOBS INCLUDE(IMS*,PROD*,ACCT*)                           /* ALL DATA BASE JOBS */

FILTLIST VALID_UNITS
INCLUDE('3330','3340','3350','3375','3380','3390','SYSDA','')      /* VALID UNITS FOR SMS */

IF &UNIT ^= &VALID_UNITS

   THEN DO
           SET &STORCLAS = '
           WRITE 'INVALID UNIT TYPE FOR SMS ALLOCATION'
           EXIT
        END

SELECT

       WHEN (&DSN = SYS1.**)                                               /* SYSTEM DATA */
            SET &STORCLAS = 'SYSTEM'

       WHEN ((&ALLVOL = &DBVOLS) && (&JOB = &DBJOBS))                    /* DATABASE DATA */
            SET &STORCLAS = 'DBPOOL'

       WHEN ((&DSN(3) = 'CLEAR') | (&ANYVOL ^= TSO*))                     /* NON-SMS DATA */
            SET &STORCLAS = '

       WHEN (&DEF_STORCLAS ^= '')                                    /* IF DEFAULTS EXIST */
            SET &STORCLAS = &DEF_STORCLAS;

       OTHERWISE SET &STORCLAS = 'COMMON'                               /* ALL OTHER DATA */

END                                                                  /* END STORCLAS PROC */

The FILTLIST VALID_UNITS INCLUDE statement in Figure 1 does not contain the latest devices. Update the FILTLIST VALID_UNITS INCLUDE statement when new devices are installed at your installation.

Restriction: If the null unit that is illustrated in the FILTLIST VALID_UNITS INCLUDE statement in Figure 1 is not in the valid DASD units FILTLIST, and a null storage class is assigned to allocations that do not have a valid unit (units in the DASD units FILTLIST), then you cannot manage VSAM data sets allocated using IDCAMS.