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

TSO Telnet in Batch mode


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 18, 2012 8:44 pm
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
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
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

Moderator Emeritus


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

PostPosted: Mon Jun 18, 2012 10:30 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 18, 2012 10:41 pm
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 18, 2012 11:01 pm
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: 1742
Location: Tirupur, India

PostPosted: Mon Jun 18, 2012 11:14 pm
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

Moderator Emeritus


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

PostPosted: Mon Jun 18, 2012 11:24 pm
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
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
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

Moderator Emeritus


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

PostPosted: Tue Jun 19, 2012 1:49 am
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: 691
Location: Earth

PostPosted: Wed Jun 20, 2012 12:48 am
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

Moderator Emeritus


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

PostPosted: Wed Jun 20, 2012 1:32 am
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: 691
Location: Earth

PostPosted: Wed Jun 20, 2012 1:58 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top