zowe / data-sets

Repo for the springboot based data set APIs
Eclipse Public License 2.0
6 stars 5 forks source link

Explicitly identify when a dataset is cataloged but does not exist #175

Open bohns opened 3 years ago

bohns commented 3 years ago

Is your feature request related to a problem? Please describe.

If zOSMF ds operation encounters a z/OS dataset that is cataloged but doesn't exist on disk, it returns the following:

{"dsname":"IBMUSER.SYSPLEX.JCL","catnm":"CATALOG.Z24B.MASTER","dev":"3390","migr":"NO","mvol":"N","vol":"WORK01"}

... which the Zowe data-sets API maps to:

{"name":"IBMUSER.SYSPLEX.JCL","deviceType":"3390","migrated":false,"catalogName":"CATALOG.Z24B.MASTER"}

User code must check to see if the volumeSerial attribute is missing in order to detect this condition.

The API should explicitly indicate that the dataset is cataloged but does not exist on the specified disk.

Describe the solution you'd like

I suggest adding an attribute mapping of "datasetExists" (True/False) and include this in the API result.

bohns commented 3 years ago

Addendum: This is the TSO output from zOSMF when a list of datasets includes one that doesn't exist on disk:

[09:18:59.747426] ServletDispatcher[I]: Received request: GET /ds?dslevel=ibmuser [09:18:59.760612] ServletDispatcher[I]: z/OSMF transaction: tx000000000001735D [09:18:59.761557] ServletDispatcher[I]: Invoking Servlet: SELECT PGM(IZUGLSDS) PARM(-LI,t -q 327744 -r 0x204f4028 ) [09:19:00.494136] ListDatasetsServlet[W]: DSINFO ERROR, dsname = IBMUSER.SYSPLEX.JCL information not found [09:19:00.861413] ServletDispatcher[I]: Servlet IZUGLSDS completed, RC=0