FTP’ing a Library
September 25, 2002 Timothy Prickett Morgan
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
Sponsored By WORKSRIGHT SOFTWARE |
On June 30, 2002,
On July 1, 2002, We have the solution! CASS certify your mailing names and addresses and presort your outgoing mail and save. Our CASS certification software ensures that your address files have valid ZIP Code and address information. Our presort software ensures that you can properly prepare you mail for delivery to your Post Office. WorksRight Software, Inc. is the number-one source for iSeries and AS/400 CASS, presort, ZIP Code, and area code software and data.
Visit our Web site – www.worksright.com – to learn more about our CASS and presorting software, or contact WorksRight Software, Inc., phone 601-856-8337, |