diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index ab0f61df80..d24f981698 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -12,6 +12,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes +- Fixed dataset allocation issue when secondary space (or other numeric values that did not exists in the dataset-template) where specified [#2591](https://github.com/zowe/vscode-extension-for-zowe/issues/2591) + ## `2.12.2` ### Bug fixes diff --git a/packages/zowe-explorer/src/dataset/actions.ts b/packages/zowe-explorer/src/dataset/actions.ts index 4a89c1e7dc..c6654a1dd4 100644 --- a/packages/zowe-explorer/src/dataset/actions.ts +++ b/packages/zowe-explorer/src/dataset/actions.ts @@ -631,7 +631,7 @@ export async function createFile(node: api.IZoweDatasetTreeNode, datasetProvider if (property.key === `dsName`) { dsName = property.value; } else { - if (typeof propertiesFromDsType[property.key] === "number") { + if (typeof propertiesFromDsType[property.key] === "number" || property.type === "number") { dsPropsForAPI[property.key] = Number(property.value); } else { dsPropsForAPI[property.key] = property.value; diff --git a/packages/zowe-explorer/src/globals.ts b/packages/zowe-explorer/src/globals.ts index f52ae42730..659137fed1 100644 --- a/packages/zowe-explorer/src/globals.ts +++ b/packages/zowe-explorer/src/globals.ts @@ -146,12 +146,14 @@ export const DATA_SET_PROPERTIES = [ key: `avgblk`, label: `Average Block Length`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.avgblk", `Enter the average block length (if allocation unit = BLK)`), }, { key: `blksize`, label: `Block Size`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.blksize", `Enter a block size`), }, { @@ -170,6 +172,7 @@ export const DATA_SET_PROPERTIES = [ key: `dirblk`, label: `Directory Blocks`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.dirblk", `Enter the number of directory blocks`), }, { @@ -200,6 +203,7 @@ export const DATA_SET_PROPERTIES = [ key: `primary`, label: `Primary Space`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.primary", `Enter the primary space allocation`), }, { @@ -212,12 +216,14 @@ export const DATA_SET_PROPERTIES = [ key: `lrecl`, label: `Record Length`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.lrecl", `Enter the logical record length`), }, { key: `secondary`, label: `Secondary Space`, value: null, + type: `number`, placeHolder: localize("createFile.attribute.secondary", `Enter the secondary space allocation`), }, {