FTP transfer from PC to AS/400 syntax help

Posted on 2007-07-23
Last Modified: 2013-12-12
Can anyone give me  the correct syntax for transferring a file(zcoresavf.savf) from my pc to a savfile that has been created on the on the I5/AS/400?
Question by:SHSadmin
    LVL 26

    Accepted Solution


    ftp> [logon stuff first]
    ftp> bin
    ftp> quote site nam 1
    ftp> put zcoresavf.savf /qsys.lib/mylib.lib/zcoresavf.savf
    ftp> quit

    First, BIN (BINARY) is necessary for savefiles.

    Second, QUOTE SITE sends a FTP subcommand to the remote site. The subcommand in this case is NAM 1 (NAMEFMT 1) which allows you to reference objects in a PC naming syntax. This makes it easy to reference both source and target in the same syntax. Technically, specifying NAM 1 isn't strictly required here -- OS/400 will set the naming format to whatever format is used first. In this case, the PUT subcommand uses NAM 1. But it's a good idea to make this a habit. (NAM 1 also causes a .SAVF extension to be recognized as a savefile. If the savefile doesn't exist, OS/400 FTP will create a savefile. Since it's pre-created, that doesn't matter here.)

    Third, PUT the savefile wherever you want it to go. Under NAM 1 syntax, use the .SAVF extension rather than a .FILE extension. You might need/want to specify the local path or use the current local working directory. The remote 'path' could also be set via CD. Note that forward-slash is the delimiter on the remote.

    LVL 6

    Assisted Solution

    he could indeed use the classic ftp wihout switch to the namefmt 1 and avoid full paths to the library
    something like:

    cd library
    put zcoresavf.savf zcoresavf.savf

    to create the savefile before to execute the put add:
    quote rcmd crtsavf library/zcoresavf
    to clear it add:
    quote rcmd clrsavf library/zcoresavf

    Bye Muf
    LVL 26

    Expert Comment

    Since [cd library] is namefmt 0 and [put zcoresavf.savf zcoresavf.savf] is in namefmt 1, the format would need to switch explicitly at some point. Note that the PUT is being executed in a PC FTP client; therefore, the source for the PUT must be specified in PC-naming syntax.


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now