Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

When doing a PUT in FTP what causes a *SAVF vs. a PF?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • When doing a PUT in FTP what causes a *SAVF vs. a PF?

    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?

  • #2
    When doing a PUT in FTP what causes a *SAVF vs. a PF?

    Paul, What is triggering the system to know the file being PUT is a *SAVF file? 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

    Comment


    • #3
      When doing a PUT in FTP what causes a *SAVF vs. a PF?

      What do you mean by namefmt 1 vs. namefmt 0?

      Comment


      • #4
        When doing a PUT in FTP what causes a *SAVF vs. a PF?

        Paul, What do you mean by namefmt 1 vs. namefmt 0? 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

        Comment


        • #5
          When doing a PUT in FTP what causes a *SAVF vs. a PF?

          Thank you, very, very, much!

          Comment

          Working...
          X