No, LISTDSI will not work, at least not for me. Here's my REXX (based on Jon's earlier REXX):
/* rexx */ Z=OUTTRAP(SYSOUTLINE.,'*',"NOCONCAT") ADDRESS TSO INDEX=' ' "LISTALC STATUS" Z=OUTTRAP(OFF) I=1 DO i=1 to SYSOUTLINE.0 test=word(sysoutline.i,1) if test='DD1' then do x=i-1 say sysoutline.x i=sysoutline.0 end end z=listdsi("DD1 FILE") say sysdsname exit I then allocated a file to my TSO session: :ALLOC FI(DD1) DA(pdsname(memname)) SHR I then ran the REXX and received two displays as expected, but not what was wanted by the OP: pdsname(memname) pdsname The first line was from the "say sysoutline.x" and the second line was from say sysdsname As can be seen, no member name from LISTDSI. Chuck Charles Hardee CA technologies Sr Sustaining Engineer Tel: +1-952-838-1039 charles.har...@ca.com -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Peter Nuttall Sent: Friday, September 10, 2010 9:29 AM To: IBM-MAIN@bama.ua.edu Subject: Re: REXX : how to determine the member name of a DD card In the second part of Itschak's reply he tells you how to extract the member name from the returned sysdsname ... "CUNY Yann" <yc...@externe.generali.fr> Sent by: "IBM Mainframe Discussion List" <IBM-MAIN@bama.ua.edu> 10/09/2010 04:05 PM Please respond to "IBM Mainframe Discussion List" <IBM-MAIN@bama.ua.edu> To IBM-MAIN@bama.ua.edu cc Subject Re: REXX : how to determine the member name of a DD card With the listdsi, i only have the pdsname in the sysdsname variable ... The member name is not indicated. -----Message d'origine----- De : IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] De la part de Itschak Mugzach Envoyé : jeudi 9 septembre 2010 18:02 À : IBM-MAIN@bama.ua.edu Objet : Re: REXX : how to determine the member name of a DD card I would try LISTDSI('xxx file). It might return the dsnname into SYSDSNAME which you can investigate using member=(word(translate(sysdsname,' ',()'),2) ITschak ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html This e-mail message, including any attachments transmitted with it, is CONFIDENTIAL and may contain legally privileged information. This message is intended solely for the use of the individual or entity to whom it is addressed. If you have received this message in error, please notify us immediately and delete it from your system. Please visit our website to read the full disclaimer: http://www.euroclear.com/site/public/disclaimer ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html