× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, Jan 5, 2009 at 1:47 PM, <THarteau@xxxxxxxxxxxxxxxxxx

<snip>

I need
to handle errors and set the sequence number, but I was able to change the
FTPMTRINDX member in V64BPCSUSR/FTPSCRIPT.

Handling errors is not easy nor reliable.

Given the way to are transferring the file, the only way to handle
errors is by parsing the log file.

Let me second the recommendation that you use Scott Klement's FTPAPI.
Not only is it cleaner, but it make it quite easy to recogize and
handle errors.

The API isn't hard to use, here is one of Scott's sample programs showing a PUT.


/COPY QRPGLESRC,FTPAPI_H €
D Msg S 52A
D sess S 10I 0

* connect to FTP server. If an error occurs,
* display an error message and exit.
c eval sess = ftp_conn('ftpserv.mydomain.com':
c 'myname':
c 'mypassword')
c if sess < 0
c eval Msg = ftp_errorMsg(0)
c dsply Msg
c eval *inlr = *on
c return
c endif

* put the FIPS utility (downloaded in TESTGET program) on
* the FTP server.
c callp ftp_binaryMode(sess: *on)
c if ftp_put(sess: 'fips.exe': '/fips.exe')<0
c eval Msg = ftp_errorMsg(sess)
c dsply Msg
c endif

c callp ftp_quit(sess)
c eval *inlr = *on
c return

HTH,
Charles

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.