You may use the example program shown below to identify which tapes are found in BRMS but that are not shown in Library Manager. The program first performs the DSPTAPCTG command to an output file and then it calls the MLDQRY query to compare this file with the media management file (QA1AMM) in the QUSRBRM library. This is only one example of a query that might be run to identify volume mismatches between BRMS and the tape library.
/**************************************************************/ /* PROGRAM: MLDPGM */ /**************************************************************/ PGM DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(256) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) MONMSG MSGID(CPF0000 MCH0000) EXEC(GOTO CMDLBL(ERROR)) /**************************************************************/ /* FILE OVERRIDE */ /**************************************************************/ OVRPRTF FILE(QPPGMDMP) HOLD(*YES) /**************************************************************/ /* DISPLAY MLD INFORMATION AND RUN THE QUERY */ /**************************************************************/ DLTF FILE(QTEMP/TEMP1) MONMSG MSGID(CPF0000) DSPTAPCTG DEV(MLD01) CGY(*SHARE400) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/TEMP1) RUNQRY QRY(QGPL/MLDQRY) RETURN /**************************************************************/ /* DEFAULT ERROR HANDLER */ /**************************************************************/ ERROR: RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) + SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE) MONMSG MSGID(CPF0000 MCH0000) CHGJOB LOG(4 0 *SECLVL) LOGCLPGM(*YES) DSPJOBLOG OUTPUT(*PRINT) ENDPGM /**************************************************************/