Can we retry FTP connection in JCL?

JES2/3, JCL, utilities.
Post Reply
Archana G
New Member
Posts: 5
Joined: Wed Apr 30, 2014 4:55 pm

Can we retry FTP connection in JCL?

Post 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.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Can we retry FTP connection in JCL?

Post by enrico-sorichetti »

a blind retry will in most cases fail as the first attempt

every error condition should be examined for proper action
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Can we retry FTP connection in JCL?

Post 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.
Regards
Nic
Archana G
New Member
Posts: 5
Joined: Wed Apr 30, 2014 4:55 pm

Re: Can we retry FTP connection in JCL?

Post by Archana G »

Thanks for the replies.

Then how is this implemented to avoid such situations? Please help.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we retry FTP connection in JCL?

Post 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.
Archana G
New Member
Posts: 5
Joined: Wed Apr 30, 2014 4:55 pm

Re: Can we retry FTP connection in JCL?

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we retry FTP connection in JCL?

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”