Saturday, July 22, 2017

Backup your AS400 SAVF in your PC

Hello Friends,

Taking backup is one of the most important thing in project life cycle. When it comes to AS400 we do save our program & data objects into TAPE using SAVOBJBRM commands. But we can also take a copy of our works (program & data objects) and save it in SAVF. And this SAVF can be transferred into your desktop.

This could be useful if you want to transfer any objects from one AS400 to another AS400 but both are not talking to each other. (If both servers are in same network then we can just copy the data using any ways like DDMF or SNDNETF or FTP)

Downloading your SAVF into your PC:

Step 1: Save your objects into SAVF

We are creating a SAVF called BKUP and saving object TESTDATA inside the SAVF




Now before we look on how to transfer this to your desktop, we need understand the IFS representation of an object in AS400.

Now our SAVF object DEVYUS1/BKUP can be viewed/identified as IFS path using below command

WRKLNK ‘/QSYS.LIB/DEVYUS1.LIB/BKUP.FILE’


In similar fashion we can see all our PF, Programs and other objects. This is important because using this we are going to FTP our BKUP.FILE into our desktop.

Step 2: Download BKUP SAVF into our desktop


When we login the current IFS directory is our home directory (/Home/DEVYUS) then we change that using Change Directory (CD) command as /QSYS.LIB/DEVYUS1.LIB

Then we change our desktop local directory (whatever you wish)

Then we choose BIN (Binary) mode to receive the file (SAVF can be transferred using BIN mode)

Then just GET command will receive the file and store it in your local directory

How to upload the file again to AS400:

Again it is quite simple and instead of GET we need to use PUT command to upload the file. But before that we need to create the SAVF in AS400 server manually.

Let us try to upload this SAVF in another library DEVYUS2

Step 1: Create SAVF

CRTSAVF DEVYUS2/BKUP

Step 2: Upload using FTP


First we change our Current Directory of AS400 to “/QSYS.LIB/DEVYUS2.LIB”

Then we change our local directory of our desktop

Then changing the transfer mode to BIN (Binary)

Then using PUT command we transfer file back to AS400

So that’s it, hope you got the idea of how to send/receive SAVF from/to your IBM I server.

Have Fun…!!! Happy Coding…!!!

No comments:

Post a Comment