View previous topic :: View next topic
|
Author |
Message |
abin
Active User
Joined: 14 Aug 2006 Posts: 198
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
abin
Active User
Joined: 14 Aug 2006 Posts: 198
|
|
|
|
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 |
|
|
|