i write a rexx to check who is using the dataset. use 'TSO TT RAFOV.TSOE.REXX' is fine(pic 01& pic 02) but failed with 'TT RAFOV.TSOE.REXX(pic 03&04). Pls help, i prefer the second way. Pls help . Source pic 05.
pic 01:
DSLIST - Data Sets Matching RAFOV.TSOE 29 Members processed
Command ===> TSO TT RAFOV.TSOE.REXX Scroll ===> CSR
Command - Enter "/" to select action Message Volume
-------------------------------------------------------------------------------
RAFOV.TSOE.CLIST DMTP02
RAFOV.TSOE.JCL.ST06 DMTP02
PIC 02:
BROWSE IBMUSER.ENQ.ENQLIST Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data **********************************
IBMUSER DEMOPKG SHARE OWN SYSTEM SYSDSN RAFOV.TSOE.
******************************** Bottom of Data ********************************
PIC 03:
DSLIST - Data Sets Matching RAFOV.TSOE Row 4 of 5
Command ===> Scroll ===> CSR
Command - Enter "/" to select action Message Volume
-------------------------------------------------------------------------------
TT RAFOV.TSOE.REXX Viewed DMTP03
RAFOV.TSOE.TEST DMTP01
***************************** End of Data Set list ****************************
PIC 04: but the file is in use, so the rexx abend for queryenq
ASNAME: 'RAFOV.TSOE.REXX'
QUERYENQ RC=8
THE FILE IS FREE
***
Source pic 05:
VIEW RAFOV.TSOE.REXX(TT) - 01.32 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 /* SAMPE TSO DSNQ RAFOV.TSOE.REXX */
000003 ARG DSNNAME
MAY = '*'
000004 ADDRESS ISPEXEC
000005 "QUERYENQ TABLE(QUERYENQ) QNAME(MAY) RNAME(DSNNAME) REQ(*) SAVE(ENQ)"
000006 /* THE VALUE OF PATTERN IS THE ACTUAL PATTERN, AND NOT A
000007 VARIABLE NAME. */
000008 SAY 'ASNAME: ' DSNNAME
000009 IF RC <> 0 THEN SAY 'QUERYENQ RC='RC
000010 IF RC = 8 THEN
000011 DO
000012 SAY 'THE FILE IS FREE'
000013 EXIT
000014 END
000015 "TBEND QUERYENQ"
000016 "BROWSE DATASET('"USERID()".ENQ.ENQLIST')"
****** **************************** Bottom of Data ****************************