diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index 9027ce8ea..186ef4334 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -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) diff --git a/packages/zosfiles/src/methods/copy/Copy.ts b/packages/zosfiles/src/methods/copy/Copy.ts index 185531b5d..cb7b56ef5 100644 --- a/packages/zosfiles/src/methods/copy/Copy.ts +++ b/packages/zosfiles/src/methods/copy/Copy.ts @@ -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 }); } } @@ -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 = { "TRACKS": "TRK", "CYLINDERS": "CYL"