Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Hi,
I am doing FTP (put) operation and I need to get the value of returncode parameter in case of a failure. For example: If the file name is not allowed on the server I need the corresponding return code of 553 for it. I do get the error description by doing a getlasterror in my catch block but is there a way to get the FTP error code in case of failure please let me know
Thanks
Abhijeet
Dear Abijeet
If you are using the pub.client.ftp:put …Output has the following
returncode Standard FTP protocol return code. returnmsg Standard FTP protocol return message. logmsg FTP log messages for the entire user session.
Srini
Abijeet,
Are you using pub.client:ftp(command=PUT) or pub.client.ftp:put?
It will return errorcode and this will be in the pipeline unless if it gives 200 it is success and remaining all codes are failure.
HTH, RMG
Hi RMG & Srini
Thanks for your replies. I am using pub.client.ftp service but I don’t get the returncode value is not the error code. I get the previous successful command value. However, I am fine with just getting the error message now.
abhijeet