ftp error codes

20 pts.
Tags:
CLP
RPG ILE
RPGLE
Hi! I'm writing a program that needs to execute the FTP command n times (where n is determined by the value of some field in a DDS table), only if there is an error during one of those executions. The question is: how can I determine if the execution failed? Thanks a lot! :) Meli

Answer Wiki

Thanks. We'll let you know when a new response is added.

Meli,

The FTP will produce a log file which you can interogate with an RPG program to see if any of the return codes are in the 500 and up range. Those are errors.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Happyjoe
    The first respondant is correct. We assume you are running scripts from a source file. Assume you are overriding output to a source file also. Two options (1) write a program to scan for the error message you want, and scan the output log after each iteration, or (2) write a trigger program to scan each incoming line for the error message you want. Then add the trigger program to the output file receiving the output log.
    0 pointsBadges:
    report
  • Kwang01
    Hi, Is there any other way outside from checking the FTP log? Understand that FTP command does not have any escape log. Rgds, SK
    0 pointsBadges:
    report
  • astradyne
    Hi Scott Klement has an open source project, FTPAPI, that allows you to perform FTP processes from within your program. Any errors in the process are trapped and returned to your program. You can download the tool from his website at http://www.scottklement.com/ftpapi/ All the best Jonathan
    370 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following