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
 

 

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: 4648
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: 2433
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: 8057
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: 2433
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: 8057
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 SNMP trap from Mainframe bipinpeter Compuware & Other Tools 6 Wed Apr 26, 2017 3:05 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Opening in Allianz India- T... Rajesh Gopinathan Mainframe Jobs 0 Wed Apr 19, 2017 11:33 am
No new posts FTP from Mainframe to Unix - with CRLF vasanthz All Other Mainframe Topics 7 Thu Mar 23, 2017 5:12 am
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm


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