Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


FTP transfer from PC to AS/400 syntax help

Posted on 2007-07-23
Medium Priority
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
  • 2
LVL 27

Accepted Solution

tliotta earned 260 total points
ID: 19549977

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.


Assisted Solution

Muflone earned 240 total points
ID: 19559189
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 27

Expert Comment

ID: 19561165
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

580 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