From 109b3d971f616bebda61540d6b247313880035f6 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Wed, 31 Jan 2024 18:01:02 -0500 Subject: [PATCH] Fixes after testing Signed-off-by: 1000TurquoisePogs --- bin/commands/init/generate/index.sh | 23 +++++++++++++++++++++++ bin/commands/init/generate/index.ts | 3 +-- bin/commands/init/mvs/index.sh | 2 +- files/SZWESAMP/ZWEIMVS | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 bin/commands/init/generate/index.sh diff --git a/bin/commands/init/generate/index.sh b/bin/commands/init/generate/index.sh new file mode 100644 index 0000000000..e76e65d10a --- /dev/null +++ b/bin/commands/init/generate/index.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +####################################################################### +# This program and the accompanying materials are made available +# under the terms of the Eclipse Public License v2.0 which +# accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-v20.html +# +# SPDX-License-Identifier: EPL-2.0 +# +# Copyright Contributors to the Zowe Project. +####################################################################### + +USE_CONFIGMGR=$(check_configmgr_enabled) +if [ "${USE_CONFIGMGR}" = "true" ]; then + if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then + # user-facing command, use tmpdir to not mess up workspace permissions + export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1 + fi + _CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/generate/cli.js" +else + echo "This command is only available when zowe.useConfigmgr=true" +fi diff --git a/bin/commands/init/generate/index.ts b/bin/commands/init/generate/index.ts index f4a6c2e7a9..6df1dc0e66 100644 --- a/bin/commands/init/generate/index.ts +++ b/bin/commands/init/generate/index.ts @@ -25,8 +25,7 @@ export function execute(dryRun?: boolean) { zosFs.copyMvsToUss(ZOWE_CONFIG.zowe.setup.dataset.prefix + '.SZWESAMP(ZWEGENER)', tempFile); let jclContents = xplatform.loadFileUTF8(tempFile, xplatform.AUTO_DETECT); - jclContents = jclContents.replace("DSN={zowe.setup.dataset.prefix}", "DSN="+ZOWE_CONFIG.zowe.setup.dataset.prefix); - jclContents = jclContents.replace("{zowe.setup.dataset.loadlib}", ZOWE_CONFIG.zowe.setup.dataset.loadlib); + jclContents = jclContents.replace(/\{zowe\.setup\.dataset\.prefix\}/gi, ZOWE_CONFIG.zowe.setup.dataset.prefix); jclContents = jclContents.replace(/\{zowe\.runtimeDirectory\}/gi, ZOWE_CONFIG.zowe.runtimeDirectory); jclContents = jclContents.replace('FILE ', 'FILE '+ZOWE_CONFIG.zowe.workspaceDirectory+'/.env/.zowe-merged.yaml'); diff --git a/bin/commands/init/mvs/index.sh b/bin/commands/init/mvs/index.sh index 52e2ef3ddd..f2a86379f6 100644 --- a/bin/commands/init/mvs/index.sh +++ b/bin/commands/init/mvs/index.sh @@ -17,7 +17,7 @@ print_level1_message "Initialize Zowe custom data sets" cust_ds_list="parmlib|Zowe parameter library jcllib|Zowe JCL library authLoadlib|Zowe authorized load library -authPluginLib|Zowe authorized plugin library +authPluginLib|Zowe authorized plugin library" ############################### # validation diff --git a/files/SZWESAMP/ZWEIMVS b/files/SZWESAMP/ZWEIMVS index 2940c66685..747655b25b 100644 --- a/files/SZWESAMP/ZWEIMVS +++ b/files/SZWESAMP/ZWEIMVS @@ -43,7 +43,7 @@ blksize(32760) unit(sysallda) space(30,15) tracks //MCOPY1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSN={zowe.setup.dataset.prefix}.SZWESAMP,DISP=SHR -//SYSUT2 DD DSN={zowe.setup.dataset.jcllib},DISP=OLD +//SYSUT2 DD DSN={zowe.setup.dataset.parmlib},DISP=OLD //SYSIN DD * COPY OUTDD=SYSUT2,INDD=SYSUT1 SELECT MEMBER=(ZWESIP00)