[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about using FTPAPIR4 under V5R2
Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>
On Sat, 18 Dec 2004, John Farmer wrote:
Questions:
1.  Is there an R5 update to the FTPAPI code?
No, but if you've been running it for 18 months there's a newer version on 
the Web site that you can download and use.
But, I only maintain one version at a time...  any "optional" features 
that don't work at earlier releases will be automatically included if you 
reinstall FTPAPI from source code.
2.  When I attempt to Put or Get using the AS400 Lib/Mbr format, I get 
an error, something like "directory not found".  It doesn't seem to be 
looking at the QSYS path even with using FTP_NAMFMT to change name 
format to the QSYS format.
FTPAPI currently only supports IFS-style filenames.  FTP_namfmt() is for 
changing the naming format on the SERVER, and does not affect the 
local-side in FTPAPI.
You can do everything that you want to do with IFS-style names.
3.  How do I retrieve the Error Code (2nd parm) from the FTP_ERROR 
function?  I only see examples that retrieve the error message text (1st 
parm).
TESTMGET does demonstrate this.  After calling the FTP_list() API, it 
checks the error code to see if the error is that no files were found 
before displaying a message to the user.
In old versions of FTPAPI (such as the one that you have) it's just:
           TextMsg = FTP_Error(ErrorNumber)
Where TextMsg is an alphanumeric string that you'd like to display to the 
user, and ErrorNumber is a "10I 0" field that will contain an error number 
intended for the program to use in decision-making.
Again, TESTMGET has an example of this.  Check it out.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------