I’m not sure if there’s a better solution with BRMS since I haven’t used it, but here’s a quick off the cuff idea –
You could direct the output of the DSPTAP command to an output file, and then read that file in the CL to see what the expiration date of the file(s) on the tape is – then you could proceed accordingly.
First off – BRMS woun’t use the volume if it is not expired.. If you are running a library, you just need to make sure you have expired tapes in the lib..
But, if you really want to check the BRMS database – <b>QUSRBRM / QA1AMM</b> is the file you probably want to look at.. Select records where the “Vault” is your tape device and that should give you what you want..