Conversation
Signed-off-by: Amber <amber.torrise@broadcom.com>
|
Client artifacts: |
|
t1m0thyj
left a comment
There was a problem hiding this comment.
Thanks for splitting out PRs - makes it easier to review ❤️ Left a few comments
|
|
||
| /** | ||
| * Zowe Explorer “allocate like” step before copy: validates the model data set exists and is not RECFM=U. | ||
| * Does not allocate; actual allocation happens on the server during `copyDataset` when the target is new. |
There was a problem hiding this comment.
Thanks for documenting this limitation 👍 The current implementation should work for copy operations. I think we'll want to create an issue to fully support "Allocate Like" in the future.
| const r = response as ds.CopyDatasetResponse & { stderr?: string; message?: string }; | ||
| const detail = r.stderr?.trim() || r.message?.trim(); |
There was a problem hiding this comment.
Same comment as above about stderr and message - I think we should catch errors instead of checking these properties.
| * Does not allocate; actual allocation happens on the server during `copyDataset` when the target is new. | ||
| * | ||
| * @param _targetDataSetName Target name Explorer passes for the next step; unused here. | ||
| * @param likeDataSetName Model data set name to validate | ||
| */ | ||
| public async allocateLikeDataSet( |
There was a problem hiding this comment.
Regardless of how copyDataset is handled in the backend...
Shouldn't we call await (await this.client).ds.createDataset inside this function?
Otherwise it seems like we are only listing data sets when calling this function. 🤔
| } | ||
| } | ||
|
|
||
| public async copyDataSet( |
There was a problem hiding this comment.
Please add TSDoc for copyDataSetMember and copyDataSet to explain the parameters and expected behavior/return values
| } | ||
|
|
||
| if (sourceDs.recfm === "U") { | ||
| Gui.errorMessage("RECFM=U data sets are not supported for copy operations"); |
There was a problem hiding this comment.
I see we are displaying an error regarding RECFM=U, and then returning the same error details as an unsuccessful response. However, I'm not seeing this error when copying a data set member from one RECFM=FB PDS to a RECFM=U PDS:
When I copy and paste a RECFM=U PDS under a new name, I see the user-friendly error in addition to this null error:
I don't think users would expect the null error, so we should try to hide/remove it. The RECFM=U error message looks good 👍


What It Does
VSCE:
copyDataSetMemberandcopyDataSetfor Zowe Explorer copy/paste, backed by thecopyDatasetJSONRPCallocateLikeDataSetso Explorer’s “allocate like” step can run before copy -> validates that the source data set exists and rejects RECFM=U. creation/allocation of a missing target is intended to be handled on the server duringcopyDataset--replaceand--deleteTargetMembersSDK:
ds.copyDatasetclient method and request/response types; unit tests for RPC shapeCLI:
zowe zssh copy dscalling the samecopyDataset path+ testsNative/c:
copyDatasetand maps JSON to the existing ds copy handlerHow to Test
Review Checklist
I certify that I have:
Additional Comments