Example 1: Find scratch tapes in system pool

To find all the volumes in the system pool that are available as scratch tapes, use this command:

TAPCMD TAPEQRY POOL SYS ONLY STATUS F HSTAT N SSTAT N NODSE INT

The "SYS ONLY" operand indicates that no tapes from private pools are to be included in the search. The status fields indicate that:

  • The tapes must be free (STATUS F),
  • Not held (HSTAT N),
  • Not system held (SSTAT N),
  • Have no DSE processing pending (NODSE), and
  • Must be an internal (INT) tape.

All of those conditions must be met before a tape can be used as a scratch tape.

If the "SYS ALL" operand had been specified, private pool scratch volumes, as well as scratch volumes in the system free pool,would have been returned. A library tape (MAN or ATL) and a media type could have been included to further restrict the results.