Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Return null for no output #494

Open
wants to merge 1 commit into
base: v3.x/staging
Choose a base branch
from

Conversation

Martin-Zeithaml
Copy link
Contributor

@Martin-Zeithaml Martin-Zeithaml commented Sep 27, 2024

Proposed changes

zos.dsinfo is returning null for empty string, object with empty array for invalid input and object with data for valid input. This is not a good practice. Return null when no data otherwise return object.

This PR addresses Issue: #493

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

PR Checklist

Please delete options that are not relevant.

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • My changes generate no new warnings

Testing

Without fix, see #493

With fix

zos.dslist()=null
zos.dslist(null)=null
zos.dslist(undefined)=null
zos.dslist(0)=null
zos.dslist(apple,banana,orange)=null
zos.dslist(false)=null
zos.dslist(sys1.maclib)=null
zos.dslist(SYS1.PARMLIB)={"datasets":[{"dsn":"SYS1.PARMLIB","entryType":"A"}]}
zos.dslist(SYS1.MACLIB)={"datasets":[{"dsn":"SYS1.MACLIB","entryType":"A"}]}

Additional information

The zos.dslist(sys1.maclib)=null is questionable. Do we want to be so strict is javascript?

Signed-off-by: Martin Zeithaml <Martin.Zeithaml@broadcom.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant