View previous topic :: View next topic
|
Author |
Message |
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 ).
You can run tso in batch. What do you want to do that would require telnet in batch? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 ).
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Keep in mind that depending on what these processes do, there may be additional consideration concerning restart/recovery. . .
Good luck!
d |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi agkshirsagar,
Good Point!
I see i was not very clear with an earlier post. . .
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
|