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
 

 

how to ping a server from JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: how to ping a server from JCL
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

Moderator Team Head


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

PostPosted: Wed Feb 04, 2009 8:09 pm    Post subject: Reply to: how to ping a server from JCL
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 04, 2009 8:16 pm    Post subject:
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    Post subject:
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 04, 2009 8:55 pm    Post subject:
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

Site Director


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

PostPosted: Thu Feb 05, 2009 12:49 am    Post subject:
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    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 Liberty Angel Server using RACF Keyring martin9 CICS 0 Tue May 02, 2017 5:49 pm
No new posts FTP Server and FTP.DATA vasanthz All Other Mainframe Topics 2 Wed Oct 12, 2016 11:49 pm
No new posts FTP from windows server into Mainfram... sathyajes All Other Mainframe Topics 24 Wed Jul 20, 2016 1:33 pm
No new posts How to perform Digest Access Authenti... vasanthz All Other Mainframe Topics 0 Tue Mar 15, 2016 4:47 pm
No new posts Any Mobile Apps use Mainframe Server? jobseeker All Other Mainframe Topics 2 Wed Feb 24, 2016 3:58 pm


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