On 15-Jul-2014 06:58 -0500, Jeff Young wrote:
I need to transmit a file in a directory in the IFS using FTP from
the IBM i server.
Best always to LCD into the directory from which file(s) will be sent
with PUT or into which file(s) will be retrieved with GET.
I have used the locsite namefmt 1 command to set my naming format on
the client.
When I use the put command, I receive an error indicating an unknown
database extension.
That error implies that, given the Current Directory, the /name/ that
was used for the [in this case, the PUT] FTP subcommand is not
compatible. I find that error to be misleading, as I would prefer a
"not found" error. It is what it is :-(
What am I missing?
The LOCSITE FTP subcommand does not modify the Current Directory. If
the FTP client had implicitly established your Local PathName to be the
HOMEDIR() from that attribute of your *USRPRF, or had established the
same Current Directory for the FTP session as that which had been
established by Change Current Directory (CD) before the FTP command had
been invoked, then perhaps the PUT would have functioned as desired.
Having issued STRTCPFTP from the IBM i, the client setting for the
NAMEFMT is established as 0=native, and your Current Library [i.e. the
CURLIB() of the job] is the Current Directory [which is
/QSYS.LIB/jobCurLib.LIB]. The name specified for the PUT request [what
was typed for that request was not offered in OP] must name something
from that current directory. Using /QSYS.LIB/something.LIB as the
current directory requires naming something like somename_x.FILE or
somename_y.FILE/somename_z.MBR or somename_a.USRSPC
As noted earliest in my reply here, use LCD to set a local pathname
as Current Directory, whereby that path is no longer within the Current
Library, and is instead in\under the root wherein the files that are to
be PUT, currently reside.
As an Amazon Associate we earn from qualifying purchases.