Media Missing from Tape Media Library 3494

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.

Note:
An example of the MLDQRY query can be found in the Backup Recovery and Media Services for OS/400: A Practical Approach Redbooks publication.
 /**************************************************************/ 
 /* 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                                                            
/**************************************************************/    
Note:
We used MLD01 in our example for the media library device. You need to substitute this parameter with the media library device name that you have on your system.


[ Top of Page | Previous Page | Next Page | Contents | Index ]