Hi Nic!
Just for interest, as it is sooooooooooooooo OLD!
I think I understood what he meant but had to use the psychic-option on turbo-boost!
This writes the dataset information he wanted as a CSV file but you could easily change the "w1" assignments ?
It includes a very simple example of BPXWDYN. This also could be switched for a straight TSO ALLOC?
/*REXX*/
TRACE "N"
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN "
pfx = 'K248610.USER' /* -OR- ... */
/*----------------------------------------------------------*/
/* accept the prefix as an argument? Uncomment to activate */
/*----------------------------------------------------------*/
/* ARG pfx */
/*-----------------------------------------------------------*/
/* create a temporary list area in VIO for the CSV data */
/*-----------------------------------------------------------*/
RC = BPXWDYN("ALLOC NEW REUSE RTDDN(TDD) LRECL(255)",
"RECFM(VB) UNIT(VIO) SPACE(5,5)TRACKS ")
IF( RC<>0 )THEN EXIT ABS(RC)
/*-------------------------------------------------------------*/
/* recall all dsns matching the prefix? Uncomment to activate */
/*-------------------------------------------------------------*/
/* ADDRESS TSO "HRECALL '"pfx"' " */
/*-----------------------------------------------------------*/
/* scan through all datasets matching the prefix */
/*-----------------------------------------------------------*/
"LMDINIT LISTID(LID) LEVEL("pfx") "
IF( RC<>0 )THEN EXIT ABS(RC)
h1 = "Dataset Name ,Create Date , Volume ,Space Units ,"
ADDRESS TSO "EXECIO 1 DISKW" tdd "(STEM H "
lst = "LISTID(&LID) DATASET(DSN) STATS(YES) OPTION(LIST) "
"LMDLIST" lst
DO WHILE RC = 0
w1 = STRIP(dsn)" ,",
!!STRIP(zdlcdate)" ,",
!!STRIP(zdlvol)" ,",
!!STRIP(zdlspacu)" ,"
ADDRESS TSO "EXECIO 1 DISKW" tdd "(STEM W "
"LMDLIST" lst
END
"LMDLIST LISTID(&LID) OPTION(FREE) "
"LMDFREE LISTID(&LID) "
ADDRESS TSO "EXECIO 0 DISKW" tdd "(FINIS "
/*-----------------------------------------------------------*/
/* view the generated dataset 'CSV' file */
/*-----------------------------------------------------------*/
"LMINIT DATAID(VID) DDNAME("tdd") "
"VIEW DATAID(&VID) "
"LMFREE DATAID(&VID) "
EXIT /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/