Control tape library resources with APIs

Use the QTARJMA and QTACJMA APIs to retrieve and to change the tape library attributes for a specific job.

For more information about the fields for the APIs, see:

Special attention to authority requirements is required when retrieving and changing the resource allocation attributes. The following provides examples of using both APIs.

  1. An application using the QTARJMA API retrieves information about the tape library attributes for the current job where the user running the job does not have *JOBCTL special authority.

    Current library attributes

    MLB name RSCALCPTY INLMNTWAIT EOVMNTWAIT
    *DEFAULT *DEV *DEV *DEV
  2. The application then uses the QTACJMA API to change the initial mount wait time (INLMNTWAIT) and the end of volume mount wait time (EOVMNTWAIT).

    The application changes the library attributes

    MLB name RSCALCPTY INLMNTWAIT EOVMNTWAIT
    *DEFAULT *DEV *IMMED *NOMAX
  3. A system administrator with *JOBCTL special authority uses the CHGJOBMLBA command to change the resource allocation priority (RSCALCPTY), initial mount wait time, and the end of volume mount wait time.

    System administrator changes attributes

    MLB name RSCALCPTY INLMNTWAIT EOVMNTWAIT
    *DEFAULT 50 *IMMED 500
  4. The application tries to use the QTACJMA API to restore the tape library attributes it retrieved earlier by using the QTACJMA API *REPLACE option. However, this function fails with an error message of CPF67B4 because the user does not have *JOBCTL special authority. None of the attributes are changed.

    Original application fails to restore attributes

    MLB name RSCALCPTY INLMNTWAIT EOVMNTWAIT
    *DEFAULT 50 *IMMED 500
Related reference
Retrieve Job Media Library Attributes (QTARJMA)
Change Job Media Library Attributes (QTACJMA)