Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

getting status of ftp command execution in jcl or cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Tue Nov 18, 2008 12:06 pm    Post subject: getting status of ftp command execution in jcl or cobol
Reply with quote

Hi,

I have a requirement where connection problem and file not available situations needs to be handled in an FTP process. Can I get this done in the same step in JCL or a COBOL code.

One wau I found was to read the output from FTP step and decide on situation based on the return and error code. Is there a better way.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Nov 18, 2008 9:12 pm    Post subject: Reply to: getting status of ftp command execution in jcl or
Reply with quote

This is a hard question to answer. I think a lot of what you do depends on your internal standards for production support and batch processing.

I believe that jobs should NOT be designed to fail for any reason. For FTP, I think that you should preferably run the FTP outside of the JCL (under some program control) so you can perform checking and validation and take appropriate courses of action without needing to cause a job failure or abend. I believe that you must check for the availability of a file first before you make any attempts to "get" one. The FTP and business process should be able to handle the occasional missing file without much external effort. Of course, I believe in the "push-only" concept of "the creator of the file must push it to the recipient as soon as it's available", but that's not always possible.

If you have a really good Production Support team, then maybe it might be better to use the EXIT=nn parameter to fail the job with a non-zero return-code and let them examine the output and take the appropriate actions.
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Nov 19, 2008 5:10 am    Post subject:
Reply with quote

Hi Kevin,

Yes EXIT=nn will fail the job. but the point is I need to find out on what reason the failure occured and build logic around it.

I tried creating a COBOL code to invoke FTP. I suceeded in invoking FTP comman. But I'm not getting a clue on how to pass the user name and password.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us