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

how to ping a server from JCL


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
farnear
Currently Banned

New User


Joined: 27 Nov 2008
Posts: 20
Location: India

PostPosted: Wed Feb 04, 2009 7:59 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Feb 04, 2009 8:09 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 04, 2009 8:16 pm
Reply with quote

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
View user's profile Send private message
farnear
Currently Banned

New User


Joined: 27 Nov 2008
Posts: 20
Location: India

PostPosted: Wed Feb 04, 2009 8:50 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 04, 2009 8:55 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 05, 2009 12:49 am
Reply with quote

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
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 How to 'Ping' a CICS region in JCL CICS 2
No new posts Z Monitoring server fails to start IBM Tools 1
No new posts FTP datasets to server CLIST & REXX 13
No new posts Anyone using the HTTP server, web app... All Other Mainframe Topics 0
No new posts Using Virtual Tape Server TS7700 as c... All Other Mainframe Topics 0
Search our Forums:

Back to Top