Page 1 of 1

Can we retry FTP connection in JCL?

Posted: Wed Oct 29, 2014 2:33 pm
by Archana G
Hi,

FOr one ofthe requirements we need to retry FTP connection from within Job in case it fails to connect to the FTP server. Can this be done?

Please suggest. Thanks.

Re: Can we retry FTP connection in JCL?

Posted: Wed Oct 29, 2014 4:31 pm
by enrico-sorichetti
a blind retry will in most cases fail as the first attempt

every error condition should be examined for proper action

Re: Can we retry FTP connection in JCL?

Posted: Wed Oct 29, 2014 6:59 pm
by nicc
However, if you INSIST...you can simply repeat the step within the JCL and make sure it does not execute (use condition codes) if the first attempt works. If you are asking..."can we loop within JCL?" then the answer is "No". JCL processes strictly from "top" to "bottom" by-passing steps as condition codes dictate.

Re: Can we retry FTP connection in JCL?

Posted: Wed Nov 12, 2014 12:20 pm
by Archana G
Thanks for the replies.

Then how is this implemented to avoid such situations? Please help.

Re: Can we retry FTP connection in JCL?

Posted: Wed Nov 12, 2014 5:13 pm
by Robert Sample
FTP is a connection to another system. You cannot guarantee that system will be available when your FTP is executed, so there is no way to avoid this problem -- period. What is usually done is to find out from the system owner the best time to do the FTP and schedule your batch job during that time frame. However, reruns will still be required at times.

Re: Can we retry FTP connection in JCL?

Posted: Thu Nov 13, 2014 2:19 pm
by Archana G
Ok. Got the point now. So in all the world all teh FTPs work only this way? Is not it a real chios?

Re: Can we retry FTP connection in JCL?

Posted: Fri Nov 14, 2014 5:24 pm
by Robert Sample
Yes, FTP works that way; both systems must be up and have FTP running for the FTP to work. However, there is no chaos because most systems involved in FTP are up 24 / 7 -- or the FTP is set for a time when both systems are available.