Skip to content

Commit

Permalink
changelog, startsWith(), comments
Browse files Browse the repository at this point in the history
Signed-off-by: jace-roell <[email protected]>
  • Loading branch information
jace-roell committed Jan 29, 2025
1 parent 9c95fa5 commit 02c3786
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/zosfiles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ All notable changes to the Zowe z/OS files SDK package will be documented in thi

## `8.12.0`

- Fixed an issue in the `Copy.dataSetCrossLPAR()` function where the `spacu` attribute of the copied data set was always set to `TRK`, regardless of the source data set's attributes. [#2412](https://github.com/zowe/zowe-cli/issues/2412)
- Enhancement: The `Copy.dataset` function now creates a new data set if the entered target data set does not exist. [#2349](https://github.com/zowe/zowe-cli/issues/2349)
- Enhancement: Added the `maxLength` option to List SDK functions (`allMembers`, `dataSetsMatchingPattern`, `membersMatchingPattern`) to specify the maximum number of items to return. [#2409](https://github.com/zowe/zowe-cli/pull/2409)
- Enhancement: Added the `start` option to List SDK functions (`allMembers`, `dataSetsMatchingPattern`, `membersMatchingPattern`) to specify the first data set/member name to return in the response. [#2409](https://github.com/zowe/zowe-cli/pull/2409)
Expand Down
8 changes: 7 additions & 1 deletion packages/zosfiles/src/methods/copy/Copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class Copy {
/*
* If the source is a PDS and no member was specified then abort the copy.
*/
if((sourceDataSetObj.dsorg == "PO" || sourceDataSetObj.dsorg == "PO-E") && sourceMember == undefined){
if((sourceDataSetObj.dsorg.startsWith("PO") || sourceDataSetObj.dsorg.startsWith("PO-E")) && sourceMember == undefined){
throw new ImperativeError({ msg: ZosFilesMessages.datasetCopiedAbortedNoPDS.message });
}
}
Expand Down Expand Up @@ -429,6 +429,12 @@ export class Copy {
* @returns {string} - The ALC value in the format used by the Create() call.
*/
private static convertAlcTozOSMF(getValue: string): string {
/**
* Create dataset only accepts tracks or cylinders as allocation units.
* When the get() call retreives the dataset info, it will convert size
* allocations of the other unit types in to tracks. So we will always
* allocate the new target in tracks.
*/
const alcMap: Record<string, string> = {
"TRACKS": "TRK",
"CYLINDERS": "CYL"
Expand Down

0 comments on commit 02c3786

Please sign in to comment.