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

Is there any batch utility to execute the MVS system command


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ananth86

New User


Joined: 10 Jun 2009
Posts: 59
Location: Hyderabad

PostPosted: Fri Oct 02, 2009 8:16 pm
Reply with quote

Hi
I want to execute some set of display commands (like /d u,,,23f4,1) on console is there any batch utility to do that?

Can I write the output of these commands to any output file?
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: Fri Oct 02, 2009 8:32 pm
Reply with quote

Code:
//JOBNAME  JOB  parameters
// D U,,,23F4,1
//STEP1    EXEC PGM=IEFBR14
//
will issue the command on the console. However, I'm not aware of any way to route the output of the command to a file -- it's called a console command because the output appears on the console.

Be aware that these commands are executed before your job runs so you cannot issue a command, run a step, then issue another command -- both commands will be executed before your step runs.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Fri Oct 02, 2009 8:54 pm
Reply with quote

You can run SDSF in batch to run commands if you are authorized. The best way for what you want is to use the Rexx interface that was recently added.

If you just want information on devices or system status (DISPLAY command output) you might want to look at the CBT tape for utilities.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Oct 02, 2009 10:02 pm
Reply with quote

The new method is the COMMAND statement for JCL
Code:
//JOBNAME  JOB  parameters
//anyname COMMAND 'D U,,,23F4,1'
//STEP1    EXEC PGM=IEFBR14
//
The commands are still issued at reader time. An advantage is continuing long commands to a new line with X in 73 and continuation in col. 16.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Oct 02, 2009 10:32 pm
Reply with quote

Another approach...

Use the CONSOLE command interface to issue commands. See Appendix C of the Rexx Reference manual. As with SDSF, you have to be authorized. And in my site, you have to be authorized to issue commands from regular JCL.

The major advantage of rexx is that you can issue a command and easily get the command response. Then, have the rexx examine that response and issue a followup command. etc...

Or, as you want, get the command response and write to a file.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top