FTP & iSeries

September 11, 2007 by Stewart Schatz · 2 Comments
Filed under: IBM i/System i/iSeries/AS400 

Ok, we have some UBEs that run and they produce a text file in the IFS System on our i550. In the processing options of these UBEs, the user can specify the name that they would like the file to have. Since their UI to the system is through the web, when they put in things like “c:\401k.txt” or “c:\insmembers.txt” the file gets placed into the root of the IFS system as a file with the name “c:\401k.txt” or “c:\insmembers.txt”. They look very strange in Navigator. And, oh by the way, you can’t delete them. The only way that I have found to delete them is by using the windows command line FTP. Here is what I do to get rid of them:

  1. Once logged in through FTP, type quote site namefmt 1 to change to the IFS naming format. You’ll notice that, if you do a pwd, the working directory is “/QSYS.LIB/QGPL.LIB”.
  2. You need to get to the root so, type cd .. [ENTER] cd .. [ENTER]. You should get a response that says your current directory is “/”.
  3. Then either use del or mdel and delete the files.

More on switching between the library file system and the directory file system when FTPing an AS400:

quote site namefmt [0|1]

  • Summary:
    • 0 – specifies the library file system
    • 1 – specifies the directory file system
  • Detail:
    • NAMEFMT 0 | 1 : Specifies the naming
      format that identifies file locations inside your FTP session.

      • NAMEFMT 0 assumes that you’re only copying
        files into and out of the QSYS.LIB file system using the DB2 UDB naming format of
        library/file.member.
      • NAMEFMT 1 is used for identifying files
        in all IFS file locations, and all files or locations must be listed in IFS notation
        (like /home/dir, /QOpenSys/dir, /QDLS/dir, /QSYS.LIB/dir.lib/file.file). To view the
        current NAMEFMT values for your FTP session, type NAMEFMT or QUOTE SITE NAMEFMT without
        any parameters.

Related Posts with Thumbnails Tags: , , , , , , , , , ,

Related posts

Comments

2 Responses to “FTP & iSeries”
  1. Doyle Hudson says:

    This works for sending to an ifs target but what about sending from the ifs?
    Help text for NAMEFMT command says to use (1) to access the ifs but you can only use the command after logging into the target system. Then it only changes the format of the server not the client. My question is how do you change the client to use format (1)?

    Thanks

Trackbacks

Check out what others are saying about this post...
  1. Anonymous says:

    free car quote

    Excellent post. Keep it up!



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!