-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) Make DS properties menu spawn with sequential datasets #181
base: v2.x/staging
Are you sure you want to change the base?
Conversation
Signed-off-by: Leanid Astrakou <[email protected]>
…orer into feature/send-nodes-event
Signed-off-by: Leanid Astrakou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatSummary would be IMO more readable, if the "if reclen > 0 summary with length else summary without length" will be simple separate function:
formatSummaryReclen(org: string, reclen: number): string {
if (reclen > 0) {
return org + reclen;
} else {
return org;
}
}
formatSummary(org: string, recfm: string, reclen: number): string {
let summary = "N/A";
if (org.substring(0, 2) == "PS") {
if (recfm && recfm != "N/A") {
if (recfm[0] == 'F') {
summary = formatSummaryReclen("FB", reclen);
} else if (recfm[0] == 'V') {
summary = formatSummaryReclen("VB", reclen);
}
} else {
summary = formatSummaryReclen("S", reclen);
}
} else if (org.substring(0, 2) == "PO") {
if (this.datasetIsPDS.length == 0) { //PDS is false
summary = formatSummaryReclen("HFS", reclen);
} else if (this.datasetIsPDS.length == 1) { //PDS is true
summary = formatSummaryReclen("PDS", reclen);
} else { // PDS/E is true
summary = formatSummaryReclen("PDSE", reclen);
}
} else if (org.substring(0, 2) == "VS") {
summary = formatSummaryReclen("VSAM", reclen);
} else if (org.substring(0, 2) == "DA") {
summary = formatSummaryReclen("DA", reclen);
}
return summary;
}
Anyway, with or without suggested change, looks good.
@Martin-Zeithaml Thanks for the review! The problem appears to be with this PR, I may have been using an invalid dataset, as sequential datasets work in the DS properties view, but not this one which has an undefined record format. If that's true, then we'd want UX to show the DS was invalid though I'm not 100% certain the test DS I was using is an invalid one, changed title to "WIP" |
Signed-off-by: Leanid Astrakou [email protected]