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

TSO WHOIS Command in JCL Program


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmi12

New User


Joined: 01 Apr 2022
Posts: 1
Location: India

PostPosted: Fri Apr 01, 2022 4:35 pm
Reply with quote

Hi,

We have a TSO Command-
Code:
TSO WHOIS userid
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
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 905
Location: Bamberg, Germany

PostPosted: Fri Apr 01, 2022 4:40 pm
Reply with quote

How about EXEC PGM=WHOIS,PARM='<uid>'? What have you tried to get some results?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 628
Location: Denmark

PostPosted: Fri Apr 01, 2022 8:02 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


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

PostPosted: Fri Apr 01, 2022 11:02 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 628
Location: Denmark

PostPosted: Sat Apr 02, 2022 4:10 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 905
Location: Bamberg, Germany

PostPosted: Sat Apr 02, 2022 11:53 pm
Reply with quote

Willy Jensen wrote:
I can't off hand remember the specific difference between IKJEFT1A and IKJEFT1B.

See https://www.ibm.com/docs/en/zos/2.4.0?topic=execution-exec-statement for the description.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Jes2 command output All Other Mainframe Topics 4
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
No new posts Receiving RC 5 when executing REXX pr... CLIST & REXX 3
No new posts COBOL program logic for comparisipn o... COBOL Programming 2
No new posts Best way to create an automated line ... TSO/ISPF 3
Search our Forums:

Back to Top