//STEP 1 EXEC PGM=...
//DD1 DD DSN=SAM,VOL=SER=TAPEA
//DD2 DD DSN=SAM,VOL=SER=TAPEB,UNIT=AFF=DD1
If neither volume TAPEA nor volume TAPEB resides in a system-managed tape library or if both TAPEA and TAPEB reside in the same system-managed tape library, then DD1 and DD2 will share one device; only one device is allocated to job step STEP1. Otherwise, DD1 and DD2 require separate devices; two devices are allocated to job step STEP1.
To control the number of devices allocated, consider the relationship of DD statements and volumes before moving existing volumes into a system-managed tape library and when choosing a system-managed tape library to create data sets that will be referenced in a UNIT=AFF statement. DD statements that specify unit affinity might require more devices after associated volumes are moved into a system-managed tape library.