[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trouble after upgrading FTPAPI



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

When I run my FTP commands script, NAMEFMT 1 works for me, however, It does
not work in a RPGLE program.

You have to understand that there are two computers involved. There's the client and the server. Therefore there are two places where the format of path names is important to know.


In a standard IBM FTP script, the "NAMEFMT 1" command would chnage BOTH the server and the client to use name format 1 (IFS-style naming)

The IBM FTP client also gives you the ability to send "SITE NAMEFMT 1" if you want to change it on the server but not on the client, and "LOCSITE NAMEFMT 1" if you wnat to change it on the client but not on the server.

NAMEFMT is an iSeries-specific thing. It does not exist on any other computer platform that I'm aware of. It's not part of the official FTP specification. That's why you have to use the QUOTE command to send the NAMEFMT command from Windows FTP command line -- because it's not available in the Windows client.

Anyway -- FTPAPI does not understand naming format. It's always NAMEFMT 1, it's never anything else. Why? Because I didn't see the point. You can send or receive ANY file on your system through NAMEFMT 1. For example if you want to send the contents of a file named CUSTMAS in library QGPL, you could use the following path:

/QSYS.LIB/QGPL.LIB/CUSTMAS.FILE/CUSTMAS.MBR

So, there's really no reason to have a NAMEFMT 0. You can do everything with NAMEFMT 1.

FTPAPI does not support NAMEFMT 0. Only 1. When you use the FTP_namfmt() API to change the name format, all it does is send the command to the server to change the server's notion of the name format. It does not change it in FTPAPI. FTPAPI still expects you to use NAMEFMT 1, no matter what you do.

In your case, you've got it sending NAMEFMT 1 to the server, and the server doesn't understand it (it's probably not an iSeries.) This is accomplishing nothing. Remove the NAMEFMT stuff from your RPG program, you don't need it.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------