IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

getting status of ftp command execution in jcl or cobol


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Nov 18, 2008 9:12 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top