z/OS TSO/E Command Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 27: Allocate three data sets using the REUSE operand

z/OS TSO/E Command Reference
SA32-0975-00

Known:

  • Data set name: MY.DATA.SET
  • MY.DATA.SET on volume STOR03 is cataloged
  • MY.DATA.SET on volume STOR99 is uncataloged
  1. Allocate MY.DATA.SET on volume STOR03:
    alloc file(x) da(my.data.set') reuse shr
  2. Allocate MY.DATA.SET on volume STOR99. The REUSE operand frees the file x allocation for MY.DATA.SET on volume STOR03 and reallocates file x to MY.DATA.SET on volume STOR99.
    alloc file(x) da('my.data.set') reuse shr vol(stor99)
  3. Allocate MY.DATA.SET on volume STOR99:
    alloc file(x) da('my.data.set') reuse shr

This is satisfied by the current allocation which is MY.DATA.SET on volume STOR99.

Note: REUSE does not free file x and then reallocate file x with MY.DATA.SET on volume STOR03 because it is satisfied by an existing allocation.

If you want to allocate MY.DATA.SET on volume STOR03, you can either free file x and then issue the same allocate command or specify volume STOR03 on the allocation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014