Open rsjrny opened 1 year ago
Hi,
maybe this is related to IBM/zopeneditor-about/issues/288.
If so, it isn't a problem of the build script but of the command created by IDz oder Z Open Editor to start the userbuild.
@friedhelmmuench ,
based on your comment I thought I would try the userbuild from USS and bypass vscode. I had the same results. The dir/$fileName.ext was malformed into dir/.ext
Good thought though.
@rsjrny, when invoking it from the USS, you need to make sure your are escaping the $
. So, it has to be \$test.asm01
. Otherwise your shell is trying to resolve it.
So, in my case with $SAM1.cbl
, it is \$SAM1.cbl
on the CLI.
It builds successfully ...
/usr/lpp/dbb/v2r0/bin/groovyz /var/dbb/dbb-zappbuild_300/build.groovy --userBuild --workspace /u/dbehm/userBuild --application SAM --hlq DBEHM.DBB.UB --outDir /u/dbehm/userBuild/work_zoe --verbose /u/dbehm/userBuild/SAM/COBOL/\$SAM1.cbl
SAM/COBOL/$SAM1.cbl
** Invoking build scripts according to build order: Assembler.groovy,Cobol.groovy,PLI.groovy
** Building files mapped to Cobol.groovy script
required props = cobol_srcPDS,cobol_cpyPDS,cobol_objPDS,cobol_loadPDS,cobol_compiler,cobol_linkEditor,cobol_tempOptions,applicationOutputsCollectionName, SDFHCOB,SDFHLOAD,SDSNLOAD,SCEELKED
** Creating / verifying build dataset DBEHM.DBB.UB.COBOL
** Creating / verifying build dataset DBEHM.DBB.UB.COPY
** Creating / verifying build dataset DBEHM.DBB.UB.OBJ
** Creating / verifying build dataset DBEHM.DBB.UB.DBRM
** Creating / verifying build dataset DBEHM.DBB.UB.LOAD
*** Building file SAM/COBOL/$SAM1.cbl
*** Resolution rules for SAM/COBOL/$SAM1.cbl:
search:/u/dbehm/userBuild/?path=SAM/COPYBOOK/*.cpy;SAM/COPYLIB/*.cpy;SAM/COPYLIB-MVS/*.cpy
*** Physical dependencies for SAM/COBOL/$SAM1.cbl:
{"excluded":false,"sourceDir":"\/u\/dbehm\/userBuild\/","lname":"CUSTCOPY","library":"SYSLIB","file":"SAM\/COPYBOOK\/CUSTCOPY.cpy","category":"COPY","resolved":true}
{"excluded":false,"sourceDir":"\/u\/dbehm\/userBuild\/","lname":"TRANREC","library":"SYSLIB","file":"SAM\/COPYBOOK\/TRANREC.cpy","category":"COPY","resolved":true}
Cobol compiler parms for SAM/COBOL/$SAM1.cbl = LIB
** Writing build report data to /u/dbehm/userBuild/work_zoe/BuildReport.json
** Writing build report to /u/dbehm/userBuild/work_zoe/BuildReport.html
** Build ended at Thu Nov 10 16:36:16 GMT+01:00 2022
** Build State : CLEAN
** Total files processed : 1
** Total build time : 6.277 seconds
Also with a full build it is finding all my test pgms:
** Writing build list file to /u/dbehm/userBuild/work_zoe/build.20221110.044055.040/buildList.txt
SAM/COPYBOOK/CUSTCOPY.cpy
SAM/zapp-example.json
SAM/COBOL/SAM$1.cbl
SAM/COBOL/epscmort.cbl
SAM/COPYBOOK/TRANREC.cpy
SAM/COBOL/$SAM1.cbl
SAM/zapp.yaml
SAM/COBOL/SAM1.cbl
** Scanning source code.
** Updating collections SAM and SAM-outputs
Thanks @dennis-behm ,
That resolved the issue when running from USS. what about when I invoke from vscode when I select Run IBM User Build? I will still have the issue.
Could dbb-zappbuild interpolate parameters passed in single quotes literally? The user build command is ran from the command line, so as a user I expect it to follow bash rules.
files with a $ in the file name cause a failure. I experienced this in my non-dbb build process and also using OCOPY to transfer files between Z/OS and USS. I resolved it by wrapping the file name in quotes.
I believe build.groovy needs to be updated to do the same wrapping.
The file I am processing is /repos/asm/$test.asm01 but as you can see below the $test has been removed from the buildlist file name
For reference the asm01.groovy you see referenced is a copy of assembler.groovy. I am experiencing the same issue with cobol.groovy