What is the OPS/MVS function that is equivalent to the IBM TSO/E REXX SYSDSN function?
OPS/MVS-Event Management & Automation-for JES2
The IBM TSO/E REXX SYSDSN function determines if a specified data set is available for your use. This is an example how the function could be used:
/* available could be set to "OK" */
available = SYSDSN('my.TSO/E.REXX.exec')
If the data set is available for your use, it returns "OK".
Under OPS/MVS consider using the ADDRESS OPSDYNAM INFO command. Then evaluate the return code for a non-zero value indicating the condition where the dataset does not exist. This is another example how to use the command from your OPS/REXX program:
/* Display information about the dataset */
Address OPSDYNAM "Info DSNAME('my.ops.rexx')"
If rc > 0 Then Signal DYNERROR
Say "DSNAME my.ops.rexx is allocated"
Return rc
DYNERROR:
Say Sourceline(sigl-1)
Say "OPSDYNAM error RC="rc "Error code="opsercd,
"Info code="opsifcd
Do While Queued() > 0
Pull errsmg
Say errmsg
End
Return rc