TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby Bakar1717 » Tue Jun 19, 2018 7:08 pm

I am using listuser command on ISPF Commad shell
Command LISTUSER, I am getting output displayed
but I need this in the MF file. how I can do this?
Thanks
Bakar1717
 
Posts: 3
Joined: Tue Jun 19, 2018 7:00 pm
Has thanked: 2 times
Been thanked: 0 time

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby NicC » Tue Jun 19, 2018 7:29 pm

What is 'the MF file'?
Do you mean that you want the results in a data set? If so, one way is to simply cut and paste using the terminal emulator facility (usually ctrl-c and ctrl-v).
I do not know the LISTUSER command - perhaps it is the RACF LU command. If so, look up the help and see if it specifies how to write the output to data set (you won't get it into a file unless you transfer the data set from the mainframe to a PC or *nix box or cu and paste into a PC or *nix box).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby Bakar1717 » Tue Jun 19, 2018 7:40 pm

I want displaying output to be written into mainframe dataset. I did not find in help
How to do it or how I can execute any command and bath mode.
I cannot do cut and paste since there are hundred of pages
Bakar1717
 
Posts: 3
Joined: Tue Jun 19, 2018 7:00 pm
Has thanked: 2 times
Been thanked: 0 time

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby Robert Sample » Tue Jun 19, 2018 7:56 pm

Run the command in batch and use SDSF (or whatever spool manager your site uses) to write the output to a data set.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby prino » Tue Jun 19, 2018 8:23 pm

/* REXX exec to view the output of a TSO command                      */
/*** trace ?r ***************************************************** \| *
*               (C) Copyright Robert AH Prins, 2007-2007               *
************************************************************************
*  ------------------------------------------------------------------  *
* | Date       | By   | Remarks                                      | *
* |------------+------+----------------------------------------------| *
* |            |      |                                              | *
* |------------+------+----------------------------------------------| *
* | 2007-08-09 | RAHP | Give message for missing command             | *
* |------------+------+----------------------------------------------| *
* | 2007-07-10 | RAHP | Initial version                              | *
* |------------+------+----------------------------------------------| *
************************************************************************
* VI is a REXX exec to view the output of a TSO command.               *
************************************************************************
* Send questions, suggestions and/or bug reports to:                   *
*                                                                      *
* robert(a)prino.org / robert.ah.prins(a)gmail.com                     *
*                                                                      *
* Robert AH Prins                                                      *
* Ozkiniu gatve 48                                                     *
* 08410 Vilnius                                                        *
* Lithuania                                                            *
************************************************************************
* This program is free software: you can redistribute it and/or        *
* modify it under the terms of the GNU General Public License as       *
* published by the Free Software Foundation, either version 3 of       *
* the License, or (at your option) any later version.                  *
*                                                                      *
* This program is distributed in the hope that it will be useful,      *
* but WITHOUT ANY WARRANTY; without even the implied warranty of       *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the         *
* GNU General Public License for more details.                         *
*                                                                      *
* You should have received a copy of the GNU General Public License    *
* along with this program. If not, see <http://www.gnu.org/licenses/>  *
***********************************************************************/
parse source source
parse value source with . . moi .

"ispexec control errors return"

arg tsocmd

if strip(tsocmd) = '' then
  do
    say 'The' moi 'command needs a TSO command as parameter'
    exit
  end

dynds = 'dyn' || random(99999)
junk  = msg(off)

"alloc f("dynds") new delete reu " ||,
                 "unit(sysda) " ||,
                 "space(150,150) tracks release " ||,
                 "recfm(f b) lrecl(140) blksize(0) "
junk = msg(on)

junk = outtrap(LINE.)
address tso tsocmd
junk = outtrap('off')

"execio" line.0 "diskw" dynds "(stem line. finis"
"ispexec lminit dataid(temp) ddname("dynds")"
"ispexec view   dataid("temp")"
"ispexec lmfree dataid("temp")"

junk = msg(off)
"free fi("dynds")" 

Usage: TSO vi {tso command} (e.g. TSO VI LU)
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post:
Bakar1717 (Tue Jun 19, 2018 9:30 pm)
User avatar
prino
 
Posts: 640
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby Pedro » Tue Jun 19, 2018 9:44 pm

Prino's example uses a temporary data set. I think you would want to replace the ALLOCATE statement with one that references your data set name.

You did not say how often you will do this... if it is frequent, you may want to follow Robert's advice about a batch job, though I would recommend to allocate SYSTSPRT to your permanent dataset.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby prino » Wed Jun 20, 2018 12:19 am

Pedro wrote:Prino's example uses a temporary data set. I think you would want to replace the ALLOCATE statement with one that references your data set name.

I wouldn't, as you can always use "create .zf .zl" to create something (more) permanent.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post:
Bakar1717 (Wed Jun 20, 2018 12:22 am)
User avatar
prino
 
Posts: 640
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby Bakar1717 » Wed Jun 20, 2018 12:23 am

Thank you, All. Working well.
Bakar1717
 
Posts: 3
Joined: Tue Jun 19, 2018 7:00 pm
Has thanked: 2 times
Been thanked: 0 time

Re: TSO COMMAND LISTUSER OUTPUT NEED TO BE WRITTEN WRITEN

Postby vasanthz » Tue Jun 26, 2018 12:27 am

//STEP02   EXEC PGM=IKJEFT01            
//SYSPRINT DD SYSOUT=*                  
//SYSTSPRT DD DISP=OLD,DSN=WELLS.SORTIN   <-- OUTPUT DATASET
//SYSUDUMP DD SYSOUT=*                  
//SYSOUT   DD SYSOUT=*                  
//SYSTSIN  DD *                        
  LU USERID                            
//                                      


Hope it helps.
User avatar
vasanthz
 
Posts: 27
Joined: Thu Aug 05, 2010 2:53 pm
Has thanked: 8 times
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post