View previous topic :: View next topic
|
Author |
Message |
rashmi12
New User
Joined: 01 Apr 2022 Posts: 1 Location: India
|
|
|
|
Hi,
We have a TSO Command-
which we use on ISPF panel.
I would like to use this command in JCL program.
Pls help to achieve this.
Thanks! |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
|
|
How about EXEC PGM=WHOIS,PARM='<uid>'? What have you tried to get some results? |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
Totally standard TSO batch.
Either:
Code: |
//TB1 EXEC PGM=IKJEFT1B
//SYSEXEC DD DISP=SHR,DSN=whatever
//STEPLIB DD DISP=SHR,DSN=whatever
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
WHOIS whoever |
or:
Code: |
//TB1 EXEC PGM=IKJEFT1B,PARM='WHOIS whoever'
//SYSEXEC DD DISP=SHR,DSN=whatever
//STEPLIB DD DISP=SHR,DSN=whatever
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY |
Now if you want to do something with the information, that is another discussion altogether. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
There are two issues here -- WHOIS in not an IBM command. There appears to be a functioning WHOIS command in CBTTAPE.ORG "file" 007.
- The correct JCL to run a TSO command in batch is something like
Code: |
// EXEC PGM=IKJEFT01,PARM='WHOIS userid'
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY |
The load module WHOIS command I analyzed uses the TPUT macro to write its messages; they will not appear in the SYSTSPRT data set. There is no hint it will use DCB/PUT to write its messages. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
The system I'm mostly working on has a WHOIS command which does show output in SYSTSPRT, so the OP might be in luck.
The way to run a TSO command in batch is either through the PARM field, or through the SYSTSIN libref as in my samples above. The advantage of using SYSTSIN is that you can run more than one command.
You can use pgm=IKJEFT01 if you want to run all the commands whether some fail, or pgm=IKJEFT1B or pgm=IKJEFT1A if you want to stop when a command fails. I can't off hand remember the specific difference between IKJEFT1A and IKJEFT1B. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1305 Location: Bamberg, Germany
|
|
Back to top |
|
|
|