Problem solve Get help with specific problems with your technologies, process and projects.

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


Dig Deeper on iSeries ILE programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close