By using the command validity checker parameter on the RMVM (remove member) command you can copy the source member...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
that is being deleted to a library (I have called 'OOPS') where it can be copied back into the library and file from which it was deleted. This has certainly saved a lot of time in needing to bring in backup tapes and restore file members from backup.
Code: PGM PARM(&P20 &P10)
DCL VAR(&P20) TYPE(*CHAR) LEN(20) DCL VAR(&P10) TYPE(*CHAR) LEN(10) DCL VAR(&FILE) TYPE(*CHAR) LEN(10) DCL VAR(&LIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSG) TYPE(*CHAR) LEN(99) MONMSG MSGID(CPF0000) CHGVAR VAR(&FILE) VALUE(%SST(&P20 1 10)) CHGVAR VAR(&LIB) VALUE(%SST(&P20 11 10)) IF COND(&LIB *NE 'OOPS') THEN(DO) CPYSRCF FROMFILE(&LIB/&FILE) TOFILE(OOPS/MEMBERS) + FROMMBR(&P10)