z/OS DFSMSdfp Storage Administration
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Examples: using volume reference

z/OS DFSMSdfp Storage Administration
SC23-6860-01

The &ALLVOL and &ANYVOL ACS read-only variables contain the following values when you use VOL=REF:
  • 'REF=SD' (the volume reference is to an SMS-managed DASD or VIO data set)
  • 'REF=ST' (the volume reference is to an SMS-managed tape data set)

    Figure 1 illustrates these values:

    Figure 1. Example of REF=ST Values when Using VOL=REF
    PROC STORGRP
    
    SELECT(&ANYVOL)
      WHEN('REF=SD')
        IF &DSTYPE = 'TEMP' & &&DSORG ^= 'VS' THEN
          SET &STORGRP = 'VIOSG','MAIN3380','MAIN3390','SPIL3380','SPIL3390'
        ELSE
          SET &STORGRP = 'MAIN3380','MAIN3390','SPIL3380','SPIL3390'
      WHEN('REF=ST')
        SET &STORGRP = &STORGRP
      OTHERWISE
      .
      .
      .
    END
    END
  • 'REF=NS' (the volume references is to a non-SMS-managed data set)

    Figure 2 illustrates these values:

    Figure 2. Example of REF=NS Values when Using VOL=REF
    PROC 0 STORCLAS
    FILTLIST AUTH_USER INCLUDE('SYSPROG1','SYSPROG2','STGADMIN','SYSADMIN')
    
    IF &ANYVOL = 'REF=NS' & &HLQ ^= 'SYS1' THEN
      IF &USER ^= &AUTH_USER THEN
        DO
          WRITE 'INVALID USE OF VOL=REF TO A NON-SMS-MANAGED DATA SET'
          WRITE 'AS OF 12/31/04 ALLOCATION WILL BE FAILED FOR ' &DSN
        END
      .
      .
      .
    END

    As of the date shown in Figure 2, you might change the ACS routine to fail the uses of VOL=REF that are not valid, as shown in Figure 3.

    Figure 3. Example of Failing VOL=REF Values That Are Not Valid
    PROC 1 STORCLAS
    FILTLIST AUTH_USER INCLUDE('SYSPROG1','SYSPROG2','STGADMIN','SYSADMIN')
    
    IF &ANYVOL = 'REF=NS' & &HLQ ^= 'SYS1' THEN
      IF &USER ^= &AUTH_USER THEN
        DO
          WRITE 'INVALID USE OF VOL=REF TO A NON-SMS-MANAGED DATA SET'
          WRITE 'DATA SET ' &DSN ' MUST BE SMS-MANAGED'
          EXIT CODE(4)
        END
      .
      .
      .
    END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014