Retrieve deleted PF SRC members

Save time by using the command validity checker parameter on the RMVM command.

By using the command validity checker parameter on the RMVM (remove member) command you can copy the source member...

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)

ENDDO


This was last published in May 2002

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close