Closed rsjrny closed 1 year ago
@rsjrny there is a similar logic to contionally load additional property files .
Here is the description: https://github.com/IBM/dbb-zappbuild/blob/c325e44ce06d5f5eb1d4c82e031b350e13ab739e/samples/application-conf/application.properties#L58-L99
The method which is invoked is in BuildUtils to check the presence of the property file: https://github.com/IBM/dbb-zappbuild/blob/c325e44ce06d5f5eb1d4c82e031b350e13ab739e/utilities/BuildUtilities.groovy#L794-L823 Rather than this logic, you would need to upload the file into a LINK card dataset . Like here
Finally, you could also treat the files in inclib
as a custom dependency to your build file. This will allow zappbuild to auto-upload the file into a dataset if present. See zappbuild wiki Adding custom dependencies to source files
excellent, thanks
I will go at it using https://github.com/IBM/dbb-zappbuild/wiki/Adding-custom-dependencies-to-source-files
@rsjrny
I completely forgot to mention, that if you have a link card in the repo, zAppBuild is capable to process that through the LinkEdit.groovy
.
You can just configure Cobol.groovy
to only do the Compile step, and the LinkEdit is picking up later by the linkcard!
Much much easier, and works if the members inclib
are a complete link card (might not be the case, then?)
The MortgageApplication contains a sample at https://github.com/IBM/dbb-zappbuild/tree/zAppBuild_2_x/samples/MortgageApplication/link
Based on the DBB scanners, automatically a dependency between the cobol pgm and the link card in the repo is established to enable the impact builds .
Would that work with your inclib configuration?
I even like this better. it would definitely work in my environment.
Thank you.
I currently have a JCL process that searches for and supplies the LinkEdit SYSLIN statements for my Assembler, Cobol, and C programs.
The process searches the ./inclib/ directory for a memberName.inc01 where memberName matches the ${member} being compiled. If found it uses the contents of that file for the LinkEdit SYSLIN. If not found it builds and uses the default SYSLIN that looks like this: INCLUDE OBJLIB(memberName)
NAME $memberName(R)
Is it possible to accomplish this in the current groovy scripts?