diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 3f0727843c..9915adfd2b 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -151,6 +151,13 @@ echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWECONF;" >>JCL echo "sed 's|UTF-8|IBM-1047|g' _ZWECONF > ZWECONF;" >>JCL echo "cp -T ZWECONF \$target;" >>JCL echo "/*" >>JCL +echo "//CHMODZWE EXEC PGM=BPXBATCH" >>JCL +echo "//STDOUT DD SYSOUT=*" >>JCL +echo "//STDERR DD SYSOUT=*" >>JCL +echo "//STDPARM DD *" >>JCL +echo "SH set -x;set -e;" >>JCL +echo "chmod -R 777 ${ZOWE_MOUNT};" >>JCL +echo "/*" >>JCL sh scripts/submit_jcl.sh "$(cat JCL)" if [ $? -gt 0 ]; then exit -1; fi diff --git a/pswi/04_create_cleanup.sh b/pswi/04_create_cleanup.sh index 16fcc98b3b..f682379f3a 100644 --- a/pswi/04_create_cleanup.sh +++ b/pswi/04_create_cleanup.sh @@ -100,29 +100,28 @@ sh scripts/submit_jcl.sh "$(cat JCL)" # Not checking results so the script doesn't fail rm JCL -if [ "$ZOSMF_V" = "2.3" ]; then - # Unmount and delete - echo "Unmounting and deleting zFS ${WORK_ZFS}." - - echo ${JOBST1} >JCL - echo ${JOBST2} >>JCL - echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL - echo "//SYSTSPRT DD SYSOUT=*" >>JCL - echo "//SYSTSOUT DD SYSOUT=*" >>JCL - echo "//SYSTSIN DD * " >>JCL - echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL - echo "IMMEDIATE" >>JCL - echo "/*" >>JCL - echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL - echo "//SYSPRINT DD SYSOUT=*" >>JCL - echo "//SYSIN DD *" >>JCL - echo " DELETE ${WORK_ZFS}" >>JCL - echo "/*" >>JCL - - sh scripts/submit_jcl.sh "$(cat JCL)" - # Not checking results so the script doesn't fail - rm JCL -fi + +# Unmount and delete +echo "Unmounting and deleting zFS ${WORK_ZFS}." + +echo ${JOBST1} >JCL +echo ${JOBST2} >>JCL +echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL +echo "//SYSTSPRT DD SYSOUT=*" >>JCL +echo "//SYSTSOUT DD SYSOUT=*" >>JCL +echo "//SYSTSIN DD * " >>JCL +echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL +echo "IMMEDIATE" >>JCL +echo "/*" >>JCL +echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL +echo "//SYSPRINT DD SYSOUT=*" >>JCL +echo "//SYSIN DD *" >>JCL +echo " DELETE ${WORK_ZFS}" >>JCL +echo "/*" >>JCL + +sh scripts/submit_jcl.sh "$(cat JCL)" +# Not checking results so the script doesn't fail +rm JCL echo "Invoking REST API to unmount Zowe zFS ${ZOWE_ZFS} from its mountpoint."