[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about using FTPAPIR4 under V5R2
Sender: "John Farmer" <johnfarmer@xxxxxxxxxxx>
> 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.
Are these limitations of the IBM API? I wanted to replace our current
routine with API calls so I could test for errors after each step, but I
guess that will have to wait. Our current callable FTP routine is a
combination of CL & RPG to create and execute an FTP script using the OS400
FTP command, then parse the log looking for error codes. Is this the best
approach for sending/receiving for the QSYS (lib/fil.mbr) format? Anyone
have any better suggestions for this. We call this routine supplying source
and destination parameters, from any CL needing to FTP a file. Works ok but
error checking seems a bit tricky.
Thanks,
John Farmer
johnfarmer@xxxxxxxxxxx
jfarmer@xxxxxxxxxxxxxxxx
----- Original Message -----
From: "Scott Klement" <sk@xxxxxxxxxxxxxxxx>
To: <ftpapi@xxxxxxxxxxxxx>
Sent: Monday, December 20, 2004 11:28 AM
Subject: 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
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------