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
 
Execute commands of command shell(option 6) from batch

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

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Tue Aug 12, 2014 11:40 am    Post subject: Execute commands of command shell(option 6) from batch
Reply with quote

Hi all,
Came up with a scenario where we need to execute some commands of command prompt from batch,ie, instead of going to the command prompt(option 6) and typing the command, we want to execute those commands from jcl.Is there any utility or any way this can be achieved .
We have all the commands in a ps file. We need to read each record and execute it and if possible capture the log of the executed command.Could you please suggest!
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Tue Aug 12, 2014 1:03 pm    Post subject:
Reply with quote

What?
Like running a TSO batch job having its SYSTSIN pointing to the commands file ?
That's easy, you only need to run a TSO batch job having its SYSTSIN pointing to the commands file!
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Tue Aug 12, 2014 2:50 pm    Post subject: Reply to: Execute commands of command shell(option 6) from b
Reply with quote

Yes..I am not aware of it . could you provide any sample jcl or reference.
This is what i want to do: Suppose my file have these commands:
Code:

REMOVE  I1612XX GROUP(MYGROUP) OWNER(MYGROUP)               
REMOVE  I171    GROUP(MYGROUP) OWNER(MYGROUP)               
CONNECT I151    GROUP(MYGROUP) OWNER(MYGROUP) AUTHORITY(USE)
CONNECT I151    GROUP(MYGROUP) OWNER(MYGROUP) AUTHORITY(USE)

So, i want to execute these from batch, instead of going onto option 6 and executing REMOVE I1612XX GROUP(MYGROUP) OWNER(MYGROUP) and so on..
Any sample job would be of great help! Thanks in advance
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Tue Aug 12, 2014 3:01 pm    Post subject:
Reply with quote

Code:

//RACFSTEP EXEC PGM=IKJEFT01                 
//SYSTSIN  DD   DSN=your dataset,DISP=SHR
//SYSTSPRT DD   SYSOUT=*
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 574
Location: The Universe

PostPosted: Tue Aug 12, 2014 4:22 pm    Post subject:
Reply with quote

See the Running terminal sessions as batch jobs chapter in the TSO/E General Information manual for your z/OS release for more information.
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Tue Aug 12, 2014 4:31 pm    Post subject: Reply to: Execute commands of command shell(option 6) from b
Reply with quote

Thanks a ton every one for your help and valuable suggestions!
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
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm

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