|
|
![]() |
|
|
|
|
||
|
FTP'ing a Library Hey, Ted: I think there is a way to FTP an entire library to a PC file and then restore the PC file to another iSeries machine. I just don't know where to look. Can you tell me what to do? -- Darrell FTP only transfers files, Darrell, so the only way to FTP a library is to put the library into a file. In this case, you need to use a save file. First, create a save file and then save the desired objects to it: CRTSAVF FILE(bbb/XYZ) SAVLIB LIB(aaa) DEV(*SAVF) + SAVF(bbb/XYZ) TGTRLS(*CURRENT)
Be sure to specify the proper release in the TGTRLS parameter. When you FTP the save file to the PC, use a binary transfer. I like to use the extension .savf on my PC files that contain save files. That's not necessary, but when I see the file sitting on my hard drive months later, I know what it is. Let's suppose you wish to transfer save file XYZ to PC file XYZ.SAVF in the TEMP directory. If you are doing the transfer from the PC side, use these FTP commands: bin quote site namefmt 0 get bbb/xyz c:/temp/xyz.savf When you copy the save file from your PC to the second iSeries machine, you have to take steps to make sure the data winds up on the iSeries as a save file, not as a physical file. There are two ways to do this. If you are using name format 0 (library/file.member), you must create the save file on the iSeries before running the FTP transfer. You can either create the save file during a terminal session, or use QUOTE RCMD to create the save file from your FTP session: quote rcmd crtsavf ccc/xyz quote site namefmt 0 put c:/temp/xyz.savf ccc/xyz If you use name format 1 (QSYS.LIB/library.LIB/file.SAVF), you do not have to create the save file in advance: bin quote site namefmt 1 put c:/temp/xyz.savf /qsys.lib/ccc.lib/xyz.savf This is a good question, Darrell. I think this is one of those techniques that every iSeries programmer, operator, and administrator should know. -- Ted
|
Editors
Contact the Editors |
|
Last Updated: 9/25/02 Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |