View Full Version : When doing a PUT in FTP what causes a *SAVF vs. a PF?
01-01-1995, 02:00 AM
When I FTP to an AS/400 using PUT as follows the file gets created as a PF. PUT apilib.savf But when I do the FTP PUT as follows I get a *SAVF. PUT e:uildi~1apilib.savf /qsys.lib/phrtools.lib/apilib.savf The *SAVF file is what I want. What is triggering the system to know the file being PUT is a *SAVF file? Does the triggering only happen on savefiles?
05-25-2000, 09:23 AM
Paul, <font color=blue>What is triggering the system to know the file being PUT is a *SAVF file?</font> In your second case, it is the use of namefmt 1 with a .savf extension. The FTP server is smart enough to know that means you want a SAVF file created. With namefmt 0, if the file does not exist you get a regular PF. If the file does exist (either PF or SAVF), it retains its current attribute. Therefore you can replace a SAVF using namefmt 0, but if you want to create a new one you should first do a QUOTE RCMD CRTSAVF name followed by the PUT. Using namefmt 1 means you don't need to care. BTW, in the first example using namefmt 0, the .savf was interpreted as being the member name, not a file type or extension. So it created a PF with a name of apilib and a member name of savf. Doug
05-25-2000, 10:23 AM
What do you mean by namefmt 1 vs. namefmt 0?
05-25-2000, 10:47 AM
Paul, <font color=blue>What do you mean by namefmt 1 vs. namefmt 0? </font> Basically, namefmt 0 allows FTP access to just those files in the "library file system" using the syntax library/filename.mbrname Namefmt 1 was added in V3R1 to allow access to all file systems, including the "library file system". But objects in the library file system are accessed with the syntax /QSYS.LIB/library.LIB/filename.FILE/mbrname.MBR where the extensions LIB, FILE, and MBR are given explicitly. In this context, you can use the suffix .SAVF instead of .FILE to differentiate between a SAVF and a PF. If you don't explicitly specify the namefmt subcommand, FTP attempts to tell from your first reference which syntax you are using (but the server defaults to namefmt 0 for backward compatibility). Hence, your use of "apilib.savf" looked like the format filename.member and thus still in namefmt 0. For more information, start FTP on the 400, login, then issue HELP NAMEFMT. It will explain how to use namefmt to access the IFS, documents, CD files, etc plus the original library file system. Doug
05-25-2000, 11:23 AM
Thank you, very, very, much!
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.