Using tape pools within the TMS

The following is the recommended method of using tape pools within the TMS.

  1. When a new tape is required, it is first allocated out of the specified pool using the subroutine FMALLO.
  2. The job that allocates this volume should then write the data and, if successful, move the volume to another named pool, optionally write-locking it.
  3. If the job fails, it should return the volume to the pool from which it came.
  4. When the data is no longer required, the entry can be deleted from the catalogue with the tape volume automatically write-enabled and freed using the shell rm command.

    Thus, a FORTRAN program might look like the following.

                      Example of using TMS tape pools
                                      

    *
    *     Allocate a new 3480 from the pool XX_FREE
    *
          CALL FMALLO('3480','38K',' ','SMCF_1','XX_FREE',
         +LBANK,' ',VSN,VID,IRC)
    *
    *     Now write the data ...
    *
    ...
    ...
    *
    *     OK - write-lock the tape and move to XX_DSTS
    *     set TMS tag to generic name
    *
    10    CONTINUE
          CALL FMPOOL(GENAM,LBANK,KEYS,'XX_DSTS','LS',IRC)
          RETURN
    *
    *     Error - free tape
    *     delete TMS tag
    *
    20    CONTINUE
          CALL FMPOOL(GENAM,LBANK,KEYS,'XX_FREE','D',IRC)
          RETURN
          END