REXX

5 pts.
Tags:
Mainframe Datasets
REstructured eXtended eXecutor
REXX
I need to read a file having a name of the dataset. And then have to check whether it is cataloged or not. Can anyone let me know how to do it? Thanks for the information
ASKED: February 26, 2009  11:23 AM
UPDATED: January 15, 2010  12:59 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here is how I do it. I’m using REXX in the TSO environment.

/* rexx */
dsn = “‘my.dsn.name’” /* note that the value contains single tics around the dsn name, */
/* otherwise TSO will append your prefix to the beginning. */
chkdsn = sysdsn(dsn)

/* now the variable chkdsn should have one of the following values:
OK /* data set or member is available */
MEMBER NOT FOUND
MEMBER SPECIFIED, BUT DATASET IS NOT PARTITIONED
DATASET NOT FOUND
ERROR PROCESSING REQUESTED DATASET
PROTECTED DATASET /* a member was specified and RACF
prevents this user from accessing
this data set */
VOLUME NOT ON SYSTEM
INVALID DATASET NAME, dsname
MISSING DATASET NAME
UNAVAILABLE DATASET /* another user has an exclusive ENQ
on the specified data set */
*/

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Archvimk
    Hi Im using the code given above to know if a dataset is cataloged or not. But when i run it , i jus get the RC as 0 and i don get message saying that ' member not found' or ' miising dataset' etc. Pls help
    65 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following