AS400 SAV-RESTORE using Save File





Save the files FILE1 and FILE2 from Library SLIB to the save file SAVF in TSAVLIBin the source system.

SAVOBJ OBJ(FILE1 FILE2) LIB(SLIB) DEV(*SAVF) SAVF(TSAVLIB/SAVF)

Then in the Source system Use FTP to put the Content of Save File (TSAVLIB/SAVF) to a save file (TSAVLIB2/SAVF) in the destination system.

FTP SYSTEM1
PUT TSAVLIB/SAVF TSAVLIB2/SAVF
(Get in Destination System wont run sometimes hence always used PUT)

Once FTP is complete. Restore Objects

RSTOBJ OBJ(*ALL) SAVLIB(SLIB) DEV(*SAVF) SAVF(TSAVLIB2/SAVF) MBROPT(*ALL) RSTLIB(DESTLIB)


When restoring make sure the library is a separate library (Create a New)because this restore will clear and restore the object so you will lose whatever in the restoring library. It is safe clear the library first so that you dont let the system clear it and you can backup whatever you want to keep.

---------------------------------------------------------------------------

Save 2 members (/More than 2) from 2 files into save file.


SAVOBJ OBJ(CBLSRC DDSSRC) LIB(SRCLIB) DEV(*SAVF) SAVF(SAVOBJLIB/SAVF) FILE
MBR((DDSSRC (PGM1DSPF)) (CBLSRC (PGM1CO))) OUTMBR(*FIRST *ADD)         
2 objects saved from library SAVOBJLIB. 0 objects not included.           



Comments

Popular posts from this blog

AS400 : Add a new line in text in email SNDSMTPEMM

AS400 Display: Radio Button (SNGCHCFLD)

AS400 Display File: Check Box (MLTCHCFLD)