View previous topic :: View next topic
|
Author |
Message |
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
friends,
can anyone help me on ftp.
1) i need to check the server down/up from IBM JCL
2) And I need to do ftp the files only when server is up.
Is there a way to handle this?
~farnear~ |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
If you send a ping to a server, a response will only indicate the the server is up. You can issue ping as a TSO command in a batch TSO step, parse/read the resulting output, and go from there.
If you want to confirm that FTP is up and responding, you're going to have to open an FTP session, log on, receive an FTP command prompt, etc. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
And what do you do if FTP is not available on the server? The batch job can't just sit there and wait for FTP to come up.
This is a management issue disguised as a technical issue. Management needs to determine when the FTP server will be up and available so the batch job can be scheduled during that window. Any technical solutions to the management problem are, at best, somewhat limited since they can't address the root problem of the FTP server being down when it is needed. |
|
Back to top |
|
|
farnear Currently Banned New User
Joined: 27 Nov 2008 Posts: 20 Location: India
|
|
|
|
Thanks for both of your replies.
I have used ping cmd in a rexx program and it worked fine.. I hope this is the suggestion given by Kevin.
If not could u pls explain your suggestionn
Is there any JCL command available for PING?
If anyone knows pls let me know. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
//TMP EXEC PGM=IKJEFT01,REGION=0M,
// DYNAMNBR=200,TIME=1440
//*
//SYSPROC DD DSN=SYS1.SBPXEXEC,DISP=SHR
//*
//SYSTSPRT DD SYSOUT=*,LRECL=133
//STDOUT DD SYSOUT=*
//*
//SYSTSIN DD *
ping 1.2.3.4
/*
// |
As Kevin warned, PING does not tell you that FTP is available on the server. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you not waste time checking server availability - just sent the file and if the send fails (for any reason) the job should present the error in whatever manner is standard for reporting errors on your system.
Also suggest that something be scheduled on the server to "pull" the data rather than have the mainframe "push" the data. The mainframe is more likely to be up and available.
As was mentioned - this is really a management issue looking for a technical solution. . . |
|
Back to top |
|
|
|