diff --git a/bin/commands/init/apfauth/index.sh b/bin/commands/init/apfauth/index.sh index 472d7192c4..581636ffd5 100644 --- a/bin/commands/init/apfauth/index.sh +++ b/bin/commands/init/apfauth/index.sh @@ -11,14 +11,9 @@ # 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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/apfauth/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/apfauth/cli.js" + diff --git a/bin/commands/init/generate/index.sh b/bin/commands/init/generate/index.sh index d081d672c9..caf2d9acc6 100644 --- a/bin/commands/init/generate/index.sh +++ b/bin/commands/init/generate/index.sh @@ -11,13 +11,9 @@ # 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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/generate/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/generate/cli.js" + diff --git a/bin/commands/init/index.sh b/bin/commands/init/index.sh index 13ef5ab299..50eda3f124 100755 --- a/bin/commands/init/index.sh +++ b/bin/commands/init/index.sh @@ -13,14 +13,8 @@ init_missing_yaml_properties -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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/cli.js" diff --git a/bin/commands/init/mvs/index.sh b/bin/commands/init/mvs/index.sh index bb087f43f6..fdc7dbe0e4 100644 --- a/bin/commands/init/mvs/index.sh +++ b/bin/commands/init/mvs/index.sh @@ -12,14 +12,9 @@ init_missing_yaml_properties -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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/mvs/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/mvs/cli.js" + diff --git a/bin/commands/init/security/index.sh b/bin/commands/init/security/index.sh index 0a1b87b5a7..dd44426811 100644 --- a/bin/commands/init/security/index.sh +++ b/bin/commands/init/security/index.sh @@ -11,14 +11,8 @@ # 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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/security/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/security/cli.js" diff --git a/bin/commands/init/stc/index.sh b/bin/commands/init/stc/index.sh index dcc6a73ba4..adc2d6fee1 100644 --- a/bin/commands/init/stc/index.sh +++ b/bin/commands/init/stc/index.sh @@ -11,14 +11,8 @@ # 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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/stc/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/stc/cli.js" diff --git a/bin/commands/init/vsam/index.sh b/bin/commands/init/vsam/index.sh index 88b1d30412..8ce07f4e45 100644 --- a/bin/commands/init/vsam/index.sh +++ b/bin/commands/init/vsam/index.sh @@ -11,13 +11,8 @@ # 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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/vsam/cli.js" -else - print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316 +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),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/init/vsam/cli.js" diff --git a/bin/libs/zos.ts b/bin/libs/zos.ts index dd1d535c77..e658fcc637 100644 --- a/bin/libs/zos.ts +++ b/bin/libs/zos.ts @@ -72,8 +72,9 @@ export function verifyGeneratedJcl(config:any): string { if (!jcllib) { return undefined; } - // read JCL library and validate - let doesJclExist: boolean = zosDataset.isDatasetExists(jcllib); + const expectedMember = jcllib+'(ZWEIMVS)'; + // read JCL library and validate using expected member ZWEIMVS (init mvs command) + let doesJclExist: boolean = zosDataset.isDatasetExists(expectedMember); if (!doesJclExist) { initGenerate.execute(); } @@ -83,7 +84,7 @@ export function verifyGeneratedJcl(config:any): string { const interval = [1,5,10,30]; for (let i = 0; i < interval.length; i++) { let secs = interval[i]; - doesJclExist=zosDataset.isDatasetExists(jcllib); + doesJclExist=zosDataset.isDatasetExists(expectedMember); if (!doesJclExist) { os.sleep(secs*1000); } else {