+1 on Scott's FTPAPI - you use separate procedures for every operation, with return codes and all.
I believe Richard Schoen had created a CL wrapper around it, I don't know if it's commercially available or free - it'd be from RJS Software, part of Help Systems now.
But it wouldn't be all that hard to make such a wrapper with a ton (or at least a bunch) of CALLPRC's, right?
Cheers and Happy New Year, y'all!
On 12/31/2019 9:45 AM, Mark Waterbury wrote:
If you are just invoking the built-in IBM_i FTP client in batch, then it just reads from a "script" of input commands, and tries to execute them, one after another. It does not know or care if errors occur.
To really handle such situations properly, you should consider using a tool like Scott Klement's excellent LIBFTP (aka. FTPAPI ...). See:
for details. It comes with lots of "sample" programs to illustrate its uses. It was custom-designed to allow you to handle just such situations.
Hope that helps,
Mark S. Waterbury
On Tuesday, December 31, 2019, 10:12:27 AM EST, Kevin Monceaux <kevin@xxxxxxxxxxxxxx> wrote:
I've been noticing an occasional problem with batch FTPs where I work. If
any errors are encountered, the client seems to ignore them and continue to
process the reset of the commands in the INPUT file member, then exits
gracefully. So even if a batch FTP fails, the batch job itself ends
successfully. Is there any way to set the FTP command to stop with an
escape message if it encounters an error?
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.