Here is a simple REXX for LISTDSI: 

/* A SIMPLE REXX TEST PROGRAM */    
variable = 'data.set.name'          
x = LISTDSI(variable)               
say x                               
say SYSDSNAME                       
say SYSVOLUME                       
say SYSUNIT                         
say SYSDSORG                        
say SYSRECFM                        
say SYSLRECL                        
say SYSBLKSIZE                      
say SYSKEYLEN                       
say SYSALLOC                        
say SYSUSED                         
say SYSUSEDPAGES                    
say SYSPRIMARY                      
say SYSSECONDS                      
say SYSUNITS                        
say SYSEXTENTS                      
say SYSCREATE     
say SYSREFDATE    
say SYSEXDATE     
say SYSPASSWORD   
say SYSRACFA      
say SYSUPDATED    
say SYSTRKSCYL    
say SYSBLKSTRK    
say SYSADIRBLK    
say SYSUDIRBLK    
say SYSMEMBERS    
say SYSREASON     
say SYSMSGLVL1    
say SYSMSGLVL2    
say SYSDSSMS      
say SYSDATACLASS  
say SYSSTORCLASS  
say SYSMGMTCLASS  

Update data.set.name with a valid DSN.  The member saved must be in the SYSEXEC 
or SYSPROC concatenation. Then execute from the command line "TSO xxxtest"   
xxxtest - is the member name that was saved. 

Thank You   

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Hobart Spitz
Sent: Monday, February 20, 2023 4:46 PM
To: [email protected]
Subject: Re: Q: Where is LISTDSI kept? A: Not where you think.



CAUTION! EXTERNAL SENDER! STOP, ASSESS, AND VERIFY Do you know this person? 
Were you expecting this email? If not, report it using the Report Phishing 
Button!

Steve;

You need to brush up on your REXX.

- TSO is the default ADDRESSing environment, in most cases.  Adding or removing 
ADDRESS TSO will not make any difference.

- The -3 you are getting means there is no such command found.  The manual 
clearly states that LISTDSI is a built-in function under z/OS and whether or 
not it will run outside A TSO environment.  You must invoke it correctly.  It 
is not a command.

- STEPLIB will not help, ever.  You are barking up the wrong tree, in the wrong 
forest, on the wrong continent.

- The syntax you are using is for a host command.  That is incorrect.  You want 
to invoke LISTDSI in an expression as a function or using the REXX CALL 
instruction..

- Blank(s) are not allowed between a function name and the left parentheses of 
the argument list.  So you are still not invoking LISTDSI correctly.

- However, just removing the blank will not work either.  TSO will get only the 
return code from LISTDSI, which is also not a valid command.  You might get 
your variables set, but TSO will still complain.

Please see also my previous response.

The great thing about REXX is that it's a small, intuitive, flexible language 
in which you can do 99 percent of what all other procedural languages can do, 
combined, and much, much more..  Unfortunately, this means that too many people 
think they know what they are doing, when they don't.

I hope this helps


On Mon, 20 Feb 2023, 16:02 Steve Thompson, <[email protected]> wrote:

> IRXJCL did not work.
>
> The problem is, I will have to have ISPF because I will be using the 
> ISPF Library management routines. This is why I have been working with 
> the TSO BATCH environment.
>
> At another site where I worked, I wrote a system for generating JCL to 
> do compiles and deal with DB2 BIND, the translators, CICS, DB2, 
> PROCOBOL, IDMS, and COBOL, HLASM, C++, EZTRV, Linkedit(s) etc.
>
> So this is not my first time doing this stuff.
>
> Since I got the same -3 when I attempted to do a "LINK" within REXX 
> and the STEPLIB was missing the library that had the program we wanted 
> linked to, I figured that I must be missing a library that contains 
> LISTDSI.
>
> So in Reading The Fine Manual (I went to a church college), I removed 
> the ADDRESS TSO and this is what we get:
>
>      34 *-* listdsi ('SYSUT1 FILE')
>         >>>   "LISTDSI SYSUT1 FILE"
> COMMAND LISTDSI NOT FOUND
>         +++ RC(-3) +++
>
>
> Tomorrow is another day.
> Steve Thompson
>
>
>
> On 2/20/2023 4:10 PM, Mike Shaw wrote:
> > Steve,
> >
> > If you change the EXEC statement to use PGM=IRXJCL instead of
> PGM=IKJEFT01
> > does the result change?
> >
> > Mike Shaw
> > QuickRef Support
> >
> > On Mon, Feb 20, 2023, 2:53 PM Steve Thompson <[email protected]> wrote:
> >
> >> Thankfully this time I can show the code. One needs to understand, 
> >> sometimes I'm working on something for a client that goes ape if I 
> >> show their code without getting it in writing.
> >>
> >> This is how the second step in a PROC is being done which is where 
> >> this code gets invoked:
> >>
> >> //.....  EXEC PGM=IKJEFT01,......
> >>
> >> This is a capture of the code leading into the failure:
> >>
> >>
> >>
> >>    ADDRESS LINKMVS 'ISPQRY' /* Verify the ISPF environ */
> >>    xx = RC
> >>
> >>    IF xx > 0 THEN DO
> >>       SAY "ISPQRY did not find a valid ISPF envi
> >>       SAY "Migration System will terminate with
> >>       EXIT xx
> >>    END ; ELSE DO
> >>       SAY "ISPQRY found valid ISPF environment."
> >>       SAY "Migration System continues."
> >>    END
> >>
> >>    PARSE ARG UPPER COMMAND_LINE EXCESS
> >>    SAY "COMMAND_LINE=" COMMAND_LINE
> >>    SAY "EXCESS PARM =" EXCESS
> >>
> >>
> >>    ADDRESS TSO
> >>
> >>    listdsi 'SYSUT1 FILE'
> >>    XX = RC  /* capture RC */
> >>
> >> *XX is -3 when done. *
> >>
> >> Meanwhile, anyone have a contact for the TSO-REXX list -- Any email 
> >> to any address at Marist for me is being rejected.
> >>
> >> Steve Thompson
> >>
> >>
> >> On 2/20/2023 12:29 PM, ITschak Mugzach wrote:
> >>> Show us you code.
> >>>
> >>> בתאריך יום ב׳, 20 בפבר׳ 2023 ב-19:28 מאת Binyamin Dissen <
> >>> [email protected]>:
> >>>
> >>>> Does it work out of live ISPF?
> >>>>
> >>>> If so, try running it with TRACE in both environments.
> >>>>
> >>>> On Mon, 20 Feb 2023 11:30:27 -0500 Steve Thompson 
> >>>> <[email protected]>
> >> wrote:
> >>>> :>Interesting. I have started ISPF, and I have checked that ISPF 
> >>>> is :>active from my REXX code via ISPQRY and comes back with RC=0 
> >>>> :>(active).
> >>>> :>
> >>>> :>Later in REXX code I attempt to get INFO on a DD and that is 
> >>>> when :>LISTDSI returns -3.
> >>>> :>
> >>>> :>So apparently I need to concatenate some library and I don't 
> >>>> have :>any of the install stuff for this environment....
> >>>> :>
> >>>> :>I'm not sure that I have access to the CSIs because this is a 
> >>>> :>cloned system.
> >>>> :>
> >>>> :>Regards,
> >>>> :>Steve Thompson
> >>>> :>
> >>>> :>On 2/20/2023 11:16 AM, Lars Höglund wrote:
> >>>> :>> You have to start ISPF
> >>>> :>>
> >>>> :>> //BATCHPDF EXEC PGM=IKJEFT01,DYNAMNBR=128,
> >>>> :>> //         PARM='ISPSTART CMD(&ISPFREX &ISPFPRM)'
> >>>> :>>
> >>>> :>> //Lasse
> >>>> :>>
> >>>> :>> -----Ursprungligt meddelande----- :>> Från: IBM Mainframe 
> >>>> Discussion List <[email protected]>
> För
> >>>> Steve Thompson
> >>>> :>> Skickat: den 20 februari 2023 17:09 :>> Till: 
> >>>> [email protected] :>> Ämne: Q: Where is LISTDSI kept?
> >>>> :>>
> >>>> :>> I'm trying to build a TSO BATCH environment and it needs to 
> >>>> have
> the
> >>>> ISPF Library functions in it.
> >>>> :>>
> >>>> :>> So I copied all the DDs that I needed via TSO ISRDDN against 
> >>>> my
> TSO
> >>>> address space.
> >>>> :>>
> >>>> :>> What I am now running into is REXX is giving me a -3 for LISTDSI!!
> >>>> :>>
> >>>> :>> Reminds me of the topic:  How long for an experienced z/OS
> >> sysprog...
> >>>> :>>
> >>>> :>> I do not have any documentation for this environment. It was
> thought
> >>>> that I wouldn't need it. And it surprised me when using LISTDSI 
> >>>> in
> batch
> >>>> that it failed. So I've been trying to SRCHFOR LISTDSI under 
> >>>> ISRDDN
> and
> >> I
> >>>> find text fields, nothing in alias...
> >>>> :>>
> >>>> :>> And since my IP address for my email is still being blocked 
> >>>> at
> >> Marist
> >>>> (I have a call into them, have no idea when they will call back, 
> >>>> and I
> >> did
> >>>> send an email to someone off line -- I'm wondering if they got 
> >>>> that
> >> email,
> >>>> for running MTAs.... they will know what this is about).
> >>>> :>>
> >>>> :>> Bottom line is, I can't use TSO-REXX list for now.
> >>>> :>>
> >>>> :>> Steve Thompson
> >>>> :>>
> >>>> :>>
> >> -------------------------------------------------------------------
> >> ---
> >>>> :>> For IBM-MAIN subscribe / signoff / archive access 
> >>>> instructions,
> send
> >>>> email to [email protected] with the message: INFO IBM-MAIN 
> >>>> :>> :>>
> >> -------------------------------------------------------------------
> >> ---
> >>>> :>> For IBM-MAIN subscribe / signoff / archive access 
> >>>> instructions, :>> send email to [email protected] with the 
> >>>> message: INFO
> >> IBM-MAIN
> >>>> --
> >>>> Binyamin Dissen <[email protected]> 
> >>>> http://www.dissensoftware.com
> >>>>
> >>>> Director, Dissen Software, Bar & Grill - Israel
> >>>>
> >>>> -----------------------------------------------------------------
> >>>> ----- For IBM-MAIN subscribe / signoff / archive access 
> >>>> instructions, send email to [email protected] with the 
> >>>> message: INFO
> IBM-MAIN
> >>>>
> >> --
> >> Regards, Steve Thompson
> >>
> >> -------------------------------------------------------------------
> >> --- For IBM-MAIN subscribe / signoff / archive access instructions, 
> >> send email to [email protected] with the message: INFO 
> >> IBM-MAIN
> >>
> > --------------------------------------------------------------------
> > -- For IBM-MAIN subscribe / signoff / archive access instructions, 
> > send email to [email protected] with the message: INFO 
> > IBM-MAIN
>
> --
> Regards, Steve Thompson
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to