I think you are correct about LISTDSI not being in the shell Rexx environment.  
The various documents are not complete or consistent in what they say about TSO 
"external" routines, and the description of exactly what "address TSO" in a 
Rexx script run from the shell does for you with respect to "external" routines 
is not very clear either.  Some practical examples using TSO "external" 
functions would help.

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Seymour J Metz
Sent: Friday, August 26, 2022 10:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How to use LISTDSI from Rexx under Unix shell?

That looks like LISTDSI is not in the function package for the Unix shell. 
IMHO, this is something that the documentation should explicitly mention in an 
obvious location.

z/OS 2.5 TSO/E REXX Reference, SA32-0972-50. includes LISTDSI on p. 94 of 
Built-in functions in Chapter 4. Functions, which I took to mean that it was 
generally available. However , stumbled on Table 13. Summary of using 
instructions, functions, commands, and services in Summary of writing execs for 
different address spaces in Chapter 8. Using REXX in different address spaces, 
which on p. 94 shows LISTDSI as being available only in a TSO address space. I 
would have caught on sooner had the wording in Chapter 4 been "LISTDSI is a 
TSO/E external function and is only available in a TSO address space." instead 
of "LISTDSI is a TSO/E external function.".

Similarly, Using REXX and z/OS UNIX System Services, SA23-2283-50, didn't 
address the issue of the nonavailability of TSO functions under the shell.

I've cc'd this to IBM in hopes that they will update both manuals.


--
Shmuel (Seymour J.) Metz

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Farley, Peter x23353 [0000031df298a9da-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, August 25, 2022 2:32 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How to use LISTDSI from Rexx under Unix shell?

Results under TSO/ISPF:

      3 *-* address TSO
      4 *-* Myrc = LISTDSI("'TSOUSER.EXEC'")
        >L>   "'TSOUSER.EXEC'"
        >F>   "0"
      5 *-* Say 'RC='Myrc',reason='SYSREASON
        >L>   "RC="
        >V>   "0"
        >O>   "RC=0"
        >L>   ",reason="
        >O>   "RC=0,reason="
        >V>   "0000"
        >O>   "RC=0,reason=0000"
 RC=0,reason=0000
Results under Unix shell:

/u/tsouser > cat test.rex
/* REXX */
trace "I"
address TSO
Myrc = LISTDSI("'TSOUSER.EXEC'")
say "Myrc="Myrc",reason="SYSREASON
/u/tsouser > ls -la test.rex
-rwxr-xr-x   1 'TSOUSER  IPGROUP      100 Aug 25 13:17 test.rex
/u/tsouser > test.rex
     3 *-* address TSO
     4 *-* Myrc = LISTDSI("'TSOUSER.EXEC'")
       >L>   "'TSOUSER.EXEC'"
     4 +++ Myrc = LISTDSI("'TSOUSER.EXEC'")
IRX0043I Error running ./test.rex, line 4: Routine not found
/u/tsouser >


-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Seymour J Metz
Sent: Thursday, August 25, 2022 10:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: How to use LISTDSI from Rexx under Unix shell?

The current environment shouldn't matter,  What is the output from Sample code 
to get LISTDSI information on 'profilename.EXEC':

/* Rexx */
trace i
Myrc = LISTDSI('EXEC')
Say 'RC='Myrc',reason='SYSREASON

Do the results change if you fully qualify the name?

--
Shmuel (Seymour J.) Metz

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Farley, Peter x23353 [0000031df298a9da-dmarc-requ...@listserv.ua.edu]
Sent: Wednesday, August 24, 2022 11:44 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: How to use LISTDSI from Rexx under Unix shell?

Posted earlier today on MVS-OE but got no responses there.

I know this has probably been discussed previously but I can't seem to get the 
Marist MVS-OE archive search to work for me.

Is there any way to use the LISTDSI TSO external function from "address tso" in 
a Rexx program run under the Unix shell?

I can only get it to return RC = -3, "routine not found".  Sample code below.

RTFM seems to indicate that "address tso" in a REXX program run under the Unix 
shell will run a TSO TMP in a separate address space, which is OK, I can 
capture the output from that as needed, but I am not getting any execution of 
LISTDSI at all.

Peter

Sample code to get LISTDSI information on 'profilename.EXEC':

/* Rexx */
Address tso
Myrc = LISTDSI('EXEC')
Say 'RC='Myrc',reason='SYSREASON

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to