Many times we face the situation to send the AS400 Object to another system. If networking configuration is not available between the systems and we don’t want to use the tape, the simple approach to do the same is to follow the steps given below.
Create and Save objects to a Save File
Save the objects to a save file which we want to send. The primary reason to use a save file is that we can save any type of AS/400 object into the save file.
Use the AS/400 Create Save File (CRTSAVF) command to create a save file
CRTSAVF FILE(LIB/SAVFIL)
Then use the AS/400 Save Library (SAVLIB) or Save Object (SAVOBJ) commands to save objects to the save file
SAVLIB LIB(PGMLIB) DEV(*SAVF) SAVF(LIB/SAVFIL) TGTRLS(*PRV)
SAVOBJ OBJ(*ALL) LIB(PGMLIB) DEV(*SAVF) SAVF(LIB/SAVFIL) TGTRLS(*PRV)
FTP the Save File to the PC
The FTP commands used are,
OPEN – Used to open the FTP connection from the PC to the AS/400. Required entries are AS/400 IP address or host name, user ID and password.
BIN – Set the transfer type to binary (image). This is required when we are transferring a save file.
RCVF – Receive the save file to the PC. The prompts are remote file, to identify the save file on the AS/400, and local file, to identify where we want the copy of the save file placed.
Work with the Save File image on the PC
Once we have the save file image on the PC, we can work with it like any other PC file. Before sending the PC file to recipients, you can ZIP the file.
Prepare to upload the Save File image
Before the recipient can use FTP to upload the save file image to their AS/400 system, they need to run the CRTSAVF file command on their AS/400 to create a save file that will be uploaded to. The save file should be empty before starting the upload.
Uncompress the save file image if needed.
FTP the Save File to the AS/400
The FTP commands used are,
OPEN – opens the connection to the AS/400 system.
BIN – change the session to binary mode.
SEND – send the save file image from the PC to the AS/400 system.
Restore from the Save File
Now that the save file is restored to the recipient ’ s AS/400 system, they can use the AS/400 Restore Library (RSTLIB) or Restore Object (RSTOBJ) commands to restore from the save file. Similar to the SAVLIB and SAVOBJ commands, we can specify the device parameter as *SAVF.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment