UNSTACK Function

The UNSTACK function locates and unstacks the user-specified virtual tape volumes contained on the physical stacked tape to a physical tape as specified by the user. If a volume is invalid, it cannot be unstacked.

UNSTACK also supports heterogeneous media translation. This occurs when a virtual tape volume is unstacked to a tape media that is different from the media of the original unstacked tape volume.

Note that locateblock information on an unstacked tape will not match stored locateblock information, either on the tape or on a disk directory. For library maintenance tapes with disk directories, you can either unstack to a different serial number, which causes the on-disk directory not to be referenced, or you can use the CREATE LIBMAINTDIR function to re-create the directory. For more information on the CREATE LIBMAINTDIR function, see the Work Flow Language (WFL) Programming Reference Manual. For Enterprise Database Server tapes, you can similarly re-create the directory or force Enterprise Database Server to not use the locateblock information.

In a typical unstack operation, the serial number retains the serial number of the tape to which you are unstacking. In order to change the serial number of the output tape, you can use the AS clause.

Examples

The following are examples of commands using the UNSTACK function:

  • U TSU UNSTACK VOLID=2 TO UNITNO=96 FROM UNITNO=94

  • U TSU UNSTACK JL1 AS NEWER TO “NEWGUY” FROM UNITNO=94

  • U TSU UNSTACK “JL1” TO UNITNO=95, VOLID=2 AS NEW TO UNITNO=96 FROM “MYSTK”

  • U TSU UNSTACK VOLID=2 TO UNITNO=96 FROM UNITNO=94

Sample Run

The following is an example of the output from an UNSTACK run. In this example, both tapes are being unstacked to MT94. The tape in MT94 was scratched before this example began. The user is prompted by “MT94 IS NOT SCRATCH:OUTTAPE” when a new scratch tape needs to be inserted for the second unstack. No user intervention is required during this example other than manually inserting the second scratch tape. After the example has completed, the unstacked tapes are identical to the tapes before they were stacked, except for any renamed serial numbers.

TSU UNSTACK "JL1" AS "NEW" TO UNITNO=94, VOLID=3TO UNITNO=94, 
 VOLID=3 TO UNITNO=94 FROM UNITNO=95
#RUNNING 62228
UNSTACKING FROM STACKED TAPE [MYSTK ] ON MT95
SUCCESSFULLY UNSTACKED [JL1   ] TO [NEW   ] ON MT94
#62228 MT94 IS NOT SCRATCH: OUTTAPE
#62228 OUTTAPE REQUIRES MT94
#62228 GOING
SUCCESSFULLY UNSTACKED VOL 3 TO (UNLABELED) ON MT94
UNSTACK COMPLETED FROM STACKED TAPE [MYSTK ] ON MT95
#ET=3:09.3 PT=0.5 IO=14.3