From 5b9c6657aa53056b64acb0eca758b435ab896408 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Thu, 26 Sep 2024 16:27:19 +0200 Subject: [PATCH 1/5] need to change USS dir permissions so the target user can successfully run zwe command and change the permissions themselves Signed-off-by: mm667937 --- pswi/03_create.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 724ab7ad61..8c4575eb16 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -161,6 +161,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 From e60d6387544f7df832dea8bfd09d360ff8dfd315 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Wed, 6 Nov 2024 13:06:13 +0100 Subject: [PATCH 2/5] formatting Signed-off-by: mm667937 --- pswi/03_create.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 16203c2ac4..9915adfd2b 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -151,13 +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 +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 From a8035d96fc4a73f6cb6bf254637707fb590c4825 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 25 Nov 2024 15:46:08 +0100 Subject: [PATCH 3/5] I need to create PSWI version 9 Signed-off-by: mm667937 --- pswi/03_create.sh | 10 ++++----- pswi/04_create_cleanup.sh | 45 +++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 9915adfd2b..c41e3023e8 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -293,17 +293,17 @@ echo "Showing EXPORT JCL how it looks before the change" #else echo "Changing jobcard and adding SYSAFF" sed "s|//IZUD01EX JOB (ACCOUNT),'NAME'|$JOBST1\n$JOBST2|g" EXPORT >EXPJCL0 -sed "s|//.*gimzipInputFile.*,|EXPJCL1 -sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 -sed "s|// DD \*||g" EXPJCL2 >EXPJCL +#sed "s|//.*gimzipInputFile.*,|EXPJCL1 +#sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 +#sed "s|// DD \*||g" EXPJCL2 >EXPJCL # sed "s|ZOS003.ZWE.PSWI.|ZWE.PSWI.|g" EXPJCL3 >EXPJCL #fi -sh scripts/submit_jcl.sh "$(cat EXPJCL)" +sh scripts/submit_jcl.sh "$(cat EXPJCL0)" if [ $? -gt 0 ]; then exit -1; fi -rm ./EXPJCL +rm ./EXPJCL0 rm ./EXPORT # Pax the directory 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." From 6010478057daa9d35a1833f9e6c04258a4096695 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 25 Nov 2024 16:36:31 +0100 Subject: [PATCH 4/5] I forgot that I can't run the tests Signed-off-by: mm667937 --- pswi/PSWI-marist.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pswi/PSWI-marist.sh b/pswi/PSWI-marist.sh index 50c719367d..da7c24c284 100755 --- a/pswi/PSWI-marist.sh +++ b/pswi/PSWI-marist.sh @@ -134,13 +134,13 @@ if [ $presmpe -eq 0 ]; then if [ $create -eq 0 ]; then # Test PSWI sh 05_test.sh - test=$? - - if [ $test -eq 0 ]; then - #test the workflows - sh 051_test_workflows.sh - wf_test=$? - fi +# test=$? +# +# if [ $test -eq 0 ]; then +# #test the workflows +# sh 051_test_workflows.sh +# wf_test=$? +# fi # Cleanup after the test sh 06_test_cleanup.sh fi From b0bb345870532ddddfd7422213d06c847eb9d01d Mon Sep 17 00:00:00 2001 From: mm667937 Date: Tue, 26 Nov 2024 16:26:53 +0100 Subject: [PATCH 5/5] back to old wrong methd because I will fix that in later PR Signed-off-by: mm667937 --- pswi/03_create.sh | 10 +++++----- pswi/PSWI-marist.sh | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index c41e3023e8..9915adfd2b 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -293,17 +293,17 @@ echo "Showing EXPORT JCL how it looks before the change" #else echo "Changing jobcard and adding SYSAFF" sed "s|//IZUD01EX JOB (ACCOUNT),'NAME'|$JOBST1\n$JOBST2|g" EXPORT >EXPJCL0 -#sed "s|//.*gimzipInputFile.*,|EXPJCL1 -#sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 -#sed "s|// DD \*||g" EXPJCL2 >EXPJCL +sed "s|//.*gimzipInputFile.*,|EXPJCL1 +sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 +sed "s|// DD \*||g" EXPJCL2 >EXPJCL # sed "s|ZOS003.ZWE.PSWI.|ZWE.PSWI.|g" EXPJCL3 >EXPJCL #fi -sh scripts/submit_jcl.sh "$(cat EXPJCL0)" +sh scripts/submit_jcl.sh "$(cat EXPJCL)" if [ $? -gt 0 ]; then exit -1; fi -rm ./EXPJCL0 +rm ./EXPJCL rm ./EXPORT # Pax the directory diff --git a/pswi/PSWI-marist.sh b/pswi/PSWI-marist.sh index da7c24c284..50c719367d 100755 --- a/pswi/PSWI-marist.sh +++ b/pswi/PSWI-marist.sh @@ -134,13 +134,13 @@ if [ $presmpe -eq 0 ]; then if [ $create -eq 0 ]; then # Test PSWI sh 05_test.sh -# test=$? -# -# if [ $test -eq 0 ]; then -# #test the workflows -# sh 051_test_workflows.sh -# wf_test=$? -# fi + test=$? + + if [ $test -eq 0 ]; then + #test the workflows + sh 051_test_workflows.sh + wf_test=$? + fi # Cleanup after the test sh 06_test_cleanup.sh fi