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
 

 

TSO Telnet in Batch mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Mon Jun 18, 2012 8:21 pm    Post subject: TSO Telnet in Batch mode
Reply with quote

Hi All,

I am trying to invoke some AIX scripts from a TSO environment in a batch environment. I think TSO Telnet is one of the ways to connect to a remote environment to issue commands. Can someone help me with a sample JCL to run TSO Telnet commands from Mainframes ? Or redirecting to a reference would also do.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Jun 18, 2012 8:44 pm    Post subject:
Reply with quote

Quote:
I think TSO Telnet is one of the ways to connect to a remote environment to issue commands.
TSO is used to access a z/OS mainframe.
Telnet is used to access TSO on a z/OS mainframe, or Unix System Services on a mainframe, or whatever on other systems ....
I've never heard of using "TSO Telnet" to access a remote machine, unless you're talking about another z/OS machine within the sysplex.

The ONLY way I'm aware to (easily) execute scripts on another machine from a z/OS mainframe is to invoke REXEC, which is part of TCP/IP and is documented in the Communications Server bookshelf, IP User's Guide and Commands manual.
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Mon Jun 18, 2012 8:49 pm    Post subject: Reply to: TSO Telnet in Batch mode
Reply with quote

oh ! Thanks for your response Robert. I guess I have not done my homework enough. I will read more on that ! Thanks again for your inputs !
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Mon Jun 18, 2012 9:29 pm    Post subject:
Reply with quote

My apologies for my ignorance in this topic. I have a AIX server and a z/OS machine. I can connect to my AIX server using telnet from my PC and execute various unix commands from there. I am trying to replicate the same from the TSO environment.
I am trying to use the Telnet command available on TSO to achieve the same.

I would like execute this in a batch mode and looking for a sample JCL to achieve the same. Please advise if it is achievable or have I got misleaded somewhere !
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: Mon Jun 18, 2012 10:30 pm    Post subject:
Reply with quote

Hello,

Everywhere i've used Telnet it was a communication between a terminal and a host. I have not seen this run in batch (might exist, but not something i've used icon_smile.gif ).

You can run tso in batch. What do you want to do that would require telnet in batch?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Jun 18, 2012 10:41 pm    Post subject:
Reply with quote

Have you tried to use the TELNET command from a TSO terminal yet? If not, you need to make sure the command works at all at your site before doing anything else.

While batch TSO commands can be executed by using program IKJEFT01, I'm not sure if that will work for a TELNET session. Once you've confirmed that the TELNET command functions on your system, then you can try it using IKJEFT01 to see if it will work in batch.
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Mon Jun 18, 2012 10:46 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Everywhere i've used Telnet it was a communication between a terminal and a host. I have not seen this run in batch (might exist, but not something i've used icon_smile.gif ).

You can run tso in batch. What do you want to do that would require telnet in batch?


There are a set of Mainframe and AIX programs that I would need to be executed back and forth as a part of a single process. Rather than logging on into both the environments and switching the screen, I am trying to automate the same !
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Mon Jun 18, 2012 10:47 pm    Post subject:
Reply with quote

Robert Sample wrote:
Have you tried to use the TELNET command from a TSO terminal yet? If not, you need to make sure the command works at all at your site before doing anything else.

While batch TSO commands can be executed by using program IKJEFT01, I'm not sure if that will work for a TELNET session. Once you've confirmed that the TELNET command functions on your system, then you can try it using IKJEFT01 to see if it will work in batch.


Executing Telnet from a TSO terminal is currently blocked in my shop. We are currently involved in getting security exception to use the same. The security folks are looking for sample jobs that we would be executing once this authorization is provided and hence I am trying to create a sample job to achieve this.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Jun 18, 2012 11:01 pm    Post subject:
Reply with quote

If it works at all, a standard batch TSO job would do it. If you are not familiar with the process, try Google or this forum's search function, or try 3.4.4 Submitting Jobs in TSO Batch in the TSO User's Guide manual, which can be reached via the Manuals link at the top of this page.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Jun 18, 2012 11:14 pm    Post subject:
Reply with quote

Hi,
I have used a custom-made utility at our shop which can perform telnet via batch, logon to the environment, navigate through the ISPF screens and run a job from a particular PDS.

Unfortunately I have 0 knowledge of how it was written. But letting you know that one such utility can be written & is possible.
My collegues used to say its VTAM simulation technique or something.
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: Mon Jun 18, 2012 11:24 pm    Post subject:
Reply with quote

Hello,

Quote:
would need to be executed back and forth as a part of a single process.
How was it decided that this would be an acceptable design?

How do you intend to have the mainframe "wait" for the unix "step" to complete before continuing?

One way i've done this is to have the first process submit the next process on the "other" machine. When the submitted process successfully completes, it submits the next process on the original machine and so until the process is complete.

If a process fails on either machine, send an e-mail detailing the problem.
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Jun 19, 2012 12:27 am    Post subject:
Reply with quote

vasanthz wrote:
Hi,
I have used a custom-made utility at our shop which can perform telnet via batch, logon to the environment, navigate through the ISPF screens and run a job from a particular PDS.

Unfortunately I have 0 knowledge of how it was written. But letting you know that one such utility can be written & is possible.
My collegues used to say its VTAM simulation technique or something.


Thank you Vasanth ! Let me try to look out for something similar !
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Jun 19, 2012 12:29 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
would need to be executed back and forth as a part of a single process.
How was it decided that this would be an acceptable design?

How do you intend to have the mainframe "wait" for the unix "step" to complete before continuing?

One way i've done this is to have the first process submit the next process on the "other" machine. When the submitted process successfully completes, it submits the next process on the original machine and so until the process is complete.

If a process fails on either machine, send an e-mail detailing the problem.


Hello,

That is something we are still trying to work around with. One option we were looking at was to send a dummy file with the RC details that can be used to understand the completion of the step. The approach that you have just mentioned indeed sounds better than the one I had in mind. Thank you very much.
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: Tue Jun 19, 2012 1:49 am    Post subject: Reply to: TSO Telnet in Batch mode
Reply with quote

You're welcome icon_smile.gif

Keep in mind that depending on what these processes do, there may be additional consideration concerning restart/recovery. . .

Good luck!

d
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Wed Jun 20, 2012 12:48 am    Post subject:
Reply with quote

Rockish,
I would suggest that you consider ftp in lieu of telnet. Most of the shops I have worked with allow for ftp to/from mainframe box. Using FTP, you can submit a JCL on mainframe by transferring a JCL to JES internal reader. That JCL (or a successor job) in turn can FTP back to the AIX and trigger a shellscript using REXEC.

Talk to your local systems support for more info on addressing the JES.
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: Wed Jun 20, 2012 1:32 am    Post subject: Reply to: TSO Telnet in Batch mode
Reply with quote

Hi agkshirsagar,

Good Point!

I see i was not very clear with an earlier post. . . icon_redface.gif

When i mentioned having the processes submit across platforms, i also meant that telnet would Not be used. . . My Bad.

Yup, if data needs to be sent in addition to executing the various processes ftp would surely be a good way to go.

d
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Wed Jun 20, 2012 1:58 am    Post subject:
Reply with quote

Not a problem, Dick! (After 17000 posts, you are entitled to miss an odd one.) I agree with your point that restart/recovery needs to be given some attention in this kind of setup.
For example: both the platforms (AIX and Mainframe) will be supported by different support groups. We can run into cyclical type of problems where we need to clearly define the recovery procedure and the groups responsible.
My current shop treats the job submission via ftp as a security hole; and rightly so. Additional security permissions are needed for job submission using ftp service ids.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm


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