Examples of when the system ignores unit affinity

The following examples show cases when the system ignores the request for unit affinity but allocates the data sets. These are cases where the user specified the UNIT=AFF keyword to limit the number of devices the job requires, but the volumes required are on different device types and thus require separate units.

For example, if your installation uses tape mount management (TMM) methodology, it is possible the ACS routines will redirect some, but not necessarily all, of the DDs in a unit affinity chain to SMS-managed DASD. This redirection can cause a mix of different device categories (such as SMS-managed tape, SMS-managed DASD, non-SMS-managed tape, non-SMS-managed DASD) within a unit affinity chain, as shown in Examples 1 and 5.

When the system ignores unit affinity, message IEF278I indicates that unit affinity was ignored and provides a reason code.

Example 1
//DD1 DD DSNAME=P,DISP=NEW,UNIT=3480
//*               (P is redirected to SMSD, an SMS-managed DASD volume)
//DD2 DD DSNAME=Q,DISP=NEW,UNIT=AFF=DD1
//*               (Q is redirected to SMST, an SMS-managed TAPE volume)

In this example, the ACS routines have redirected data set P from non-SMS-managed tape to SMSD, an SMS-managed DASD volume; the ACS routines have also redirected data set Q from non-SMS-managed tape to SMST, an SMS-managed tape volume. DD2 requests unit affinity with DD1, but the system ignores the request because the redirection resulted in inconsistent device categories.

The system issues message IEF278I with reason code 1, indicating that one of the DDs is an SMS-managed request and the other is not.

Example 2
//DD1 DD DSNAME=PAYROLL,DISP=OLD

PAYROLL is a generation data group (GDG). DD1 is a GDG ALL request. The system treats a GDG ALL request like a concatenation of all the PAYROLL data sets in the catalog. All subsequent generations have unit affinity to the first. Refer to Generation data sets.

The following example shows the JCL the system creates for the GDG ALL request for the PAYROLL data set; the catalog contains 4 entries, one on tape and three on DASD.
//DD1 DD DSNAME=PAYROLL(0),DISP=OLD,UNIT=3480,
//       VOLUME=SER=TAPE01
//    DD DSNAME=PAYROLL(-1),DISP=OLD
//       VOLUME=SER=DISK03,UNIT=AFF=DD1
//    DD DSNAME=PAYROLL(-2),DISP=OLD,
//       VOLUME=SER=DISK02,UNIT=AFF=DD1
//    DD DSNAME=PAYROLL(-3),DISP=OLD,
//       VOLUME=SER=DISK01,UNIT=AFF=DD1  

The system ignores unit affinity. PAYROLL(0) is a tape and cannot share a unit with the other data sets, which reside on DASD. Because the DASD volumes are non-removable, the system allocates a separate volume to PAYROLL(-1), to PAYROLL(-2), and to PAYROLL(-3).

The system issues message IEF278I with a reason code of 2, indicating that the DDs requested incompatible generics.

Example 3
//DD1 DD DSNAME=P,DISP=OLD
//*           (P is cataloged on TEST1 in tape Library TL1)
//*           (Tape Library TL1 is eligible to 3480 devices)
//DD2 DD DSNAME=Q,DISP=OLD,UNIT=AFF=DD1
//*           (Q is cataloged on TEST2 in tape Library TL2)
//*           (Tape Library TL2 is eligible to 3490 devices)  

The system ignores the unit affinity request. P is cataloged on volume TEST1, which resides in the TL1 tape library, and Q is cataloged on volume TEST2, which resides in the TL2 tape library.

The system issues IEF278I with a reason code of 3, indicating that the DDs requested incompatible tape libraries.

Example 4
//DD1 DD DSNAME=R,DISP=OLD
//*                  (R is cataloged on T2, a 3480 tape)
//DD2 DD DSNAME=S,DISP=OLD,UNIT=AFF=DD1
//*                  (S is cataloged on T3, a 3480X tape)  

The system ignores the unit affinity request. DD1 is a 3480 tape volume, but DD2 needs a 3480X tape volume, which is not compatible with 3480.

The system issues message IEF278I with a reason code of 4, indicating that devices associated with the referenced DD (DD1) are not a subset of the devices associated with the referencing DD (DD2).

Example 5
//S1  EXEC ...
//DD1 DD DSNAME=W,DISP=(,CATALG),UNIT=3480,VOL=SER=TAPE01
//*            (W is redirected to SD2, an SMS-managed DASD volume)
//S2  EXEC ...
//DD1 DD DSNAME=W,DISP=OLD
//*            (W is cataloged on SD2, an SMS-managed DASD volume)
//DD2 DD DSNAME=X,DISP=NEW,UNIT=AFF=DD1
//*            (X is non-SMS-managed after ACS routine processing)  

In this example, the ACS routines have redirected data set W from non-SMS-managed tape to SD2, an SMS-managed DASD volume; the ACS routines have not redirected data set X. The system cannot honor the unit affinity request for DD2 in step S2 because the redirection resulted in inconsistent device categories. Therefore, the system allocates data set X as a non-SMS-managed data set on the default unit-affinity-ignored unit (named on UNITAFF in the ALLOCxx parmlib member).

The system issues message IEF278I with a reason code of 5, indicating that the referencing request (DD2) is a non-SMS-managed data set and the referenced request (DD1) is an SMS-managed data set.