zowe / zowe-common-c

C Libraries for various OS & Networking needs
Eclipse Public License 2.0
10 stars 30 forks source link

`zos.dslist` returning 3 states #493

Closed Martin-Zeithaml closed 1 month ago

Martin-Zeithaml commented 2 months ago

https://github.com/zowe/zowe-common-c/blob/954377e42b5fe158eaf1e9ec631a6c7ded83403d/c/qjszos.c#L305

Empty string "" returning null

zos.dslist()=null

Invalid parameter/wrong DSN returning empty object

zos.dslist(null)={"datasets":[]}
zos.dslist(undefined)={"datasets":[]}
zos.dslist(0)={"datasets":[]}
zos.dslist(apple,banana,orange)={"datasets":[]}
zos.dslist(false)={"datasets":[]}

Valid DSN not uppercased returning empty object

zos.dslist(sys1.maclib)={"datasets":[]}

Valid DSN example

zos.dslist(SYS1.PARMLIB)={"datasets":[{"dsn":"SYS1.PARMLIB","entryType":"A"}]}
zos.dslist(SYS1.MACLIB)={"datasets":[{"dsn":"SYS1.MACLIB","entryType":"A"}]}