Most organizations have in house tools to check for dataset contention. Mostly it is a REXX code behind the tool, however, this TSO COMMAND will help to do the same task and find the resource causing the contention.
TSO ISRDDN ENQ ‘Data-set Name’
If this is run from start menu with the dataset name, it will show the list of resources holding it up.
REXX snippet can be written to achieve the same:
/* REXX*/
DSNAME = ARG(1)
IF DSNAME = ‘ ‘ THEN DO
SAY ‘ENTER DATASET NAME’
PARSE UPPER EXTERNAL DSNAME
END
ADDRESS TSO
IF SYSDSN(“‘”DSNAME”‘”) <> ‘OK’ THEN DO
SAY “DATASET DOES NOT EXIST”
ADDRESS ISREDIT
EXIT
END
ADDRESS TSO “ISRDDN E ‘ “DSNAME” ‘ “
EXIT
Leave a comment