z/OS DFSMS Implementing System-Managed Storage
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using Volume Reference to Non-System-Managed Data Sets

z/OS DFSMS Implementing System-Managed Storage
SC23-6849-00

When a volume reference is made to a non-system-managed data set, control is passed to the ACS routines and information is provided to the ACS routines that the referenced data set is non-system-managed. The &ALLVOL and &ANYVOL ACS read-only variables contain the following value when the reference is to a non-system-managed data set: 'REF=NS'. This means the reference is to a non-system-managed data set.

You can code your ACS routines to do one of two of the following actions:
  • Allow the allocation to proceed as a non-system-managed data set.

    Figure 1 shows an example of how to code your ACS routine to allow those that meet certain criteria to proceed and warn others that the allocations will be failed after a specific date.

    Figure 1. Sample ACS Routine to Allow Allocation of Non-System-Managed Data Set
    PROC 0 STORGRP
    FILTLIST AUTH_USER INCLUDE('SYSPROG1','SYSPROG2','STGADMIN','SYSADMIN')
    
    IF &ANYVOL = 'REF=NS' THEN
     IF &USER NE &AUTH_USER THEN
       DO
         WRITE 'INVALID USE OF VOL=REF TO A NON-SYSTEM-MANAGED DATA SET'
         WRITE 'AS OF 12/31/04 ALLOCATION WILL BE FAILED FOR ' &DSN
       END
      :
    END
  • Fail the allocation by exiting with a non-zero return code.

    Figure 2 shows an example of how to code your ACS routine to fail the invalid uses of VOL=REF after the specified date.

    Figure 2. Sample ACS Routine to Fail Allocation of Non-System-Managed Data Set
    PROC 1 STORGRP
    FILTLIST AUTH_USER INCLUDE('SYSPROG1','SYSPROG2','STGADMIN','SYSADMIN')
    
    IF &ANYVOL = 'REF=NS' THEN
     IF &USER NE &AUTH_USER THEN
       DO
         WRITE 'INVALID USE OF VOL=REF TO A NON-SYSTEM-MANAGED DATA SET'
         WRITE 'DATA SET ' &DSN ' MUST BE SYSTEM-MANAGED'
         EXIT CODE(4)
       END
      :
    END

If the ACS routines attempt to make the referencing data set SMS-managed, SMS fails the allocation. This is because allowing the data set to be allocated as an SMS-managed data set could cause problems locating the data set, as well as potential data integrity problems. These problems occur when the data set is allocated with DISP=OLD or DISP=SHR, due to the tendency to copy old JCL. For example, the following sample referenced data set is non-SMS-managed:

//DD1 DD DSN-A.B.C,DISP=OLD,VOL=REF=D.E.F,....

If the referenced data set is SMS-managed, a LOCATE is done for the referencing data set, and the data set is accessed using the result of the LOCATE. If the referenced data set is non-SMS-managed, then no LOCATE is done, and the referencing data set is assumed to reside on the same volume as the referenced data set. If the referencing data set is in fact non-SMS-managed, then performing a LOCATE could result in finding another data set of the same name, causing a potential integrity problem. If the referencing data set was migrated to SMS, then not performing a LOCATE would cause the data set not to be found.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014