LISTDSI will return either a 0, 4, or 16. It also sets one of a few dozen reason codes, which indicate whether the data set is cataloged, migrated, if the directory is readable, or several other useful pieces of information. This is why the request takes more time than simply reading a VTOC entry. One way to reduce overhead is to supply the volume. In that case, LISTDSI uses an allocate instead of catalog locate.
Going through the reason codes, it indicates RC=12 means VSAM is not supported. That may reduce the usefulness of LISTDSI in gathering space statistics. LISTDSI Return Codes: http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikjb800/ikjb800159.htm LISTDSI Reason Codes: http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikjb800/ikjb800159.htm Bob Longabaugh CA Technologies Storage Management QA -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Staller, Allan Sent: Friday, July 17, 2015 8:20 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: What is the proper REXX syntax to accomplish this LISTDSI 'FULLY.QUAL.DATASET.NAME' NORECALL DCOLLECT + program or Rexx... ? <snip> I am processing a list of datasetnames and want to calculate the amount of space used for ONLY those files which are not MIGRATED. The program currently uses R = LISTDSI ("'"FQSN'"') where FQSN is the Fully Qualified Dataset Name Because there is no NORECALL parameter, each file gets RECALLED before continuing. The overhead is terrible. LISTDSI will return "dataset is migrated" if NORECALL is specified and the dataset is currently Migrated. </snip> ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN