View previous topic :: View next topic
|
Author |
Message |
ananth86
New User
Joined: 10 Jun 2009 Posts: 59 Location: Hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|