Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Executing Shell Script from Mainframe

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

New User


Joined: 09 Jan 2006
Posts: 17

PostPosted: Thu Apr 08, 2010 11:46 am    Post subject: Executing Shell Script from Mainframe
Reply with quote

Hello All,

I have a requirement of executing a Unix Shell Script in an Unix environment from Mainframe. So let's say the Mainframe will submit a job which will kick off a shell script in an Unix server.

Can this be done?

Thanks,
Subha
Back to top
View user's profile Send private message

Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Apr 08, 2010 3:03 pm    Post subject:
Reply with quote

TWS scheduling tool on z/OS can be set up to communicate with a TWS agent on a Unix server, and start shell scripts as a TWS operation.

That's one way to do it. You should talk to your production service planners to learn if it is a possibility on your installation.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Apr 08, 2010 3:06 pm    Post subject: Reply to: Executing Shell Script from Mainframe
Reply with quote

What's the relationship between the two? Is this shell script on a z/OS Unix Systems Services (USS) partition that can be directly accessed? If not, does your job scheduling system handle batch processing across the entire enterprise? If not, do both systems support the use of the Unix orexec/rexec command? If not then what do you have that connects these two together somehow?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Thu Apr 08, 2010 4:51 pm    Post subject:
Reply with quote

Search for BPXBATCH :

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.bpxa400/xbat.htm
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 08, 2010 5:01 pm    Post subject:
Reply with quote

Quote:
I have a requirement of executing a Unix Shell Script in an Unix environment from Mainframe. So let's say the Mainframe will submit a job which will kick off a shell script in an Unix server.

Can this be done?
Yes -- assuming that your site support group has set up the appropriate pieces of TCP/IP. Find the Communications Server bookshelf and do a find for REXEC.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Apr 08, 2010 5:29 pm    Post subject:
Reply with quote

PeterHolland wrote:
Search for BPXBATCH :

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.bpxa400/xbat.htm

This applies only to UNIX environments on a z/Series mainframe?

The OP didn't specify what kind of server would host the targeted UNIX environment?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Thu Apr 08, 2010 5:35 pm    Post subject:
Reply with quote

Quote:

TWS scheduling tool on z/OS can be set up to communicate with a TWS agent on a Unix server, and start shell scripts as a TWS operation

Quote:

The OP didn't specify what kind of server would host the targeted UNIX environment?


And?
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Apr 08, 2010 6:08 pm    Post subject:
Reply with quote

PeterHolland wrote:
Quote:

TWS scheduling tool on z/OS can be set up to communicate with a TWS agent on a Unix server, and start shell scripts as a TWS operation

Quote:

The OP didn't specify what kind of server would host the targeted UNIX environment?


And?

Here is more information on TWS scheduling operations on remote UNIX systems.

I have also found an IBM online presentation on agentless TWS scheduling

My site uses the TWS agent method to automatically sequence and schedule operations on s/Series servers running UNIX from a z/OS TWS server.

You should still talk to your site support people to see if this could be a solution to your requirements.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Fri Apr 09, 2010 1:14 am    Post subject:
Reply with quote

I *think* REXEC sends info, including passwords, in clear text. A better option would be SSH.
Back to top
View user's profile Send private message
deybumba_2k

New User


Joined: 09 Jan 2006
Posts: 17

PostPosted: Fri Apr 09, 2010 11:35 am    Post subject: Reply to: Executing Shell Script from Mainframe
Reply with quote

There is a relationship between the 2 system and they support REXEC. I also saw that REXEC can execute a shell script in a remote Unix server from Mainframe.

Can anybody provide any example of REXEC?

Thanks,
Subha
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 09, 2010 4:55 pm    Post subject:
Reply with quote

The simplest example I have of REXEC is:
Code:
//REXEC    EXEC PGM=REXEC,
//  PARM=('/jcap2 /jcap2/mse/DaveTemp/MerlinToProcess')
//SYSTSPRT  DD SYSOUT=*
//NETRC    DD   *
MACHINE jcap2 LOGIN mgr PASSWORD xxxxxxx
/*
//SYSPRINT  DD SYSOUT=*
//
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 Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us