We built a python pgm using pExpect for our sFTP/FTP file transfers.

We do extensive checking of each step in the process.

Since we rely on valid data we have to eliminate any chance of bungled data from outside vendors like banks, freight handlers, web orders, etc.


On 12/31/2019 10:16 AM, Vernon Hamberg wrote:
+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:
  Hi, Kevin,

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:
  Midrange Fans,

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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.