Skip to content

Commit d177891

Browse files
authored
Merge pull request #430 from IBM/develop
Release zAppBuild 3.5.0
2 parents d018b5c + c883d42 commit d177891

18 files changed

+155
-63
lines changed

build-conf/PLI.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#
44
# Comma separated list of required build properties for PLI.groovy
5-
pli_requiredBuildPropeties=pli_srcPDS,pli_incPDS,pli_objPDS,pli_loadPDS,\
5+
pli_requiredBuildProperties=pli_srcPDS,pli_incPDS,pli_objPDS,pli_loadPDS,\
66
pli_compiler,pli_linkEditor,pli_tempOptions,applicationOutputsCollectionName,\
77
SDFHCOB,SDFHLOAD,SDSNLOAD,SCEELKED, \
88
pli_dependencySearch

build-conf/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SCSQCOBC | MQ COBOL Library. Example: CSQ.V9R1M0.SCSQCOBC
2828
SCSQPLIC | MQ PLI Library. Example: CSQ.V9R1M0.SCSQPLIC
2929
SCSQLOAD | MQ Load Library. Example: CSQ.V9R1M0.SCSQLOAD
3030
SDSNLOAD | DB2 Load Library. Example: DB2.V9R1M0.SDSNLOAD
31+
SDSNEXIT | DB2 Exit Library. Example: DBC0CFG.SDSNEXIT
3132
SFELLOAD | Optional IDz Load Library. Example: FEL.V14R0M0.SFELLOAD
3233
SBZUSAMP | Optional z/OS Dynamic Test Runner IDz zUnit / WAZI VTP library containing necessary copybooks. Example : FEL.V14R2.SBZUSAMP
3334

@@ -41,7 +42,6 @@ applicationDefaultPropFiles | Comma separated list of default application confi
4142
buildListFileExt | File extension that indicates the build file is really a build list.
4243
applicationConfRootDir | Alternate root directory for application-conf location. Allows for the deployment of the application-conf directories to a static location. Defaults to ${workspace}/${application}
4344
createBuildOutputSubfolder | Option to create a subfolder with the build label within the build output dir (outDir). Default: true.
44-
buildOutputTSformat | Defines the build timestamp format for build output subfolder and build label.
4545
requiredDBBToolkitVersion | Minimum required DBB ToolkitVersion to run this version of zAppBuild.
4646
requiredBuildProperties | Comma separated list of required build properties for zAppBuild/build.groovy. Build and language scripts will validate that *required* build properties have been set before the script runs. If any are missing or empty, then a validation error will be thrown.
4747
dbb.file.tagging | Controls compile log and build report file tagging. Default: true.
@@ -323,8 +323,8 @@ transfer_requiredBuildProperties | Comma separated list of required build proper
323323
transfer_srcPDS | Dataset of any type of source
324324
transfer_jclPDS | Sample dataset for JCL members
325325
transfer_xmlPDS | Sample dataset for xml members
326-
transfer_srcOptions | BPXWDYN creation options for creating 'source' type data sets
327-
transfer_outputDatasets | List of output datasets to document deletions ** Can be overridden by a file property. ** If used for multiple, use a file property to set transfer_outputDatasets
326+
transfer_dsOptions | BPXWDYN creation options for creating 'source' type data sets
327+
transfer_outputDatasets | List of output datasets to document deletions ** Can be overridden by a file property. ** If used for multiple, use a file property to set transfer_outputDatasets
328328

329329
### language-conf/languageConfigProps01.properties
330330
Sample language configuration properties file used by dbb-zappbuild/utilities/BuildUtilities.groovy.

build-conf/Transfer.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ transfer_xmlPDS=${hlq}.XML
2020
#
2121
# This is using the DBB PropertyMapping syntax allowing multiple mappings of
2222
# target source dataset definitions to the required options
23-
#
23+
#
2424
transfer_dsOptions=cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library) :: transfer_srcPDS, transfer_jclPDS
25-
transfer_dsOptions=cyl space(1,1) lrecl(144) dsorg(PO) recfm(F,B) dsntype(library) :: transfer_xmlPDS
25+
transfer_dsOptions=cyl space(1,1) lrecl(144) dsorg(PO) recfm(F,B) dsntype(library) :: transfer_xmlPDS

build-conf/build.properties

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Supports both relative path (to zAppBuild/build-conf/) and absolute path
1515
#
1616
# These properties files expect to contain centrally managed defaults
17-
# such as system datasets, language script specific settings
17+
# such as system datasets, language script specific settings
1818
#
1919
buildPropFiles=datasets.properties,dependencyReport.properties,Assembler.properties,BMS.properties,\
2020
MFS.properties,PSBgen.properties,DBDgen.properties,ACBgen.properties,Cobol.properties,\
@@ -24,14 +24,14 @@ CRB.properties,zCEE3.properties
2424
#
2525
# Comma separated list of default application configuration property files to load
2626
# Supports both relative path (to zAppBuild/build-conf/) and absolute path
27-
#
27+
#
2828
# These properties files expect to contain centrally managed defaults
2929
# and also may reference properties files containing configuration
30-
# of the language script configurations such as return codes, deploy types
31-
#
30+
# of the language script configurations such as return codes, deploy types
31+
#
3232
# See also application-conf/application.properties#applicationPropFiles
33-
#
34-
# default:
33+
#
34+
# default:
3535
# applicationDefaultPropFiles=defaultzAppBuildConf.properties
3636
#
3737
# extended sample to set default language script configurations:
@@ -45,7 +45,7 @@ CRB.properties,zCEE3.properties
4545
# default-application-conf/Transfer.properties,\
4646
# default-application-conf/LinkEdit.properties,\
4747
# default-application-conf/ZunitConfig.properties
48-
#
48+
#
4949
applicationDefaultPropFiles=defaultzAppBuildConf.properties
5050

5151
#
@@ -58,7 +58,7 @@ applicationDefaultPropFiles=defaultzAppBuildConf.properties
5858
# a sample of the application-conf can be found in
5959
# samples/application-conf
6060
#
61-
# zAppBuild expects a file called application.properties in this directory.
61+
# zAppBuild expects a file called application.properties in this directory.
6262
#
6363
# The property also allows for the deployment of
6464
# the application-conf directories to an alternate location rather
@@ -69,7 +69,7 @@ applicationDefaultPropFiles=defaultzAppBuildConf.properties
6969
# based on workspace + application and application-conf
7070
#
7171
# applicationConfDir=${workspace}/${application}/application-conf
72-
#
72+
#
7373
#
7474
# Example: Static location on USS
7575
# applicationConfDir=/u/build/config/applications/${application}/application-conf
@@ -101,12 +101,6 @@ buildListFileExt=txt
101101
# Default: true
102102
createBuildOutputSubfolder=true
103103

104-
#
105-
# Build Timestamp Format
106-
# Applies to all build types except userBuild
107-
# Default: yyyyMMdd.HHmmss.mmm - See Date format method pattern strings
108-
buildOutputTSformat=yyyyMMdd.HHmmss.mmm
109-
110104
#
111105
# Minimum required DBB ToolkitVersion to run this version of zAppBuild
112106
# Build initialization process validates the DBB Toolkit Version in use and matches that against this setting

build-conf/datasets.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ SCSQLOAD=
5151
# DB2 Load Library. Example: DB2.V9R1M0.SDSNLOAD
5252
SDSNLOAD=
5353

54+
# DB2 Exit Library. Example: DBC0CFG.SDSNEXIT
55+
SDSNEXIT=
56+
5457
# IMS Macro Library. Example: DFS.V11R1M0.SDFSMAC
5558
SDFSMAC=
5659

build.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import groovy.cli.commons.*
2727
@Field startTime = new Date()
2828

2929
// start time message
30-
props.startTime = startTime.format("yyyyMMdd.hhmmss.mmm")
30+
props.startTime = startTime.format("yyyyMMdd.HHmmss.SSS")
3131
println("\n** Build start at $props.startTime")
3232

3333
// initialize build
@@ -89,7 +89,7 @@ if (props.error)
8989
//********************************************************************
9090

9191
def initializeBuildProcess(String[] args) {
92-
if (props.verbose) println "** Initializing build process . . ."
92+
println "**************** Initialization of the build process ****************"
9393

9494
def opts = parseArgs(args) // parse incoming options and arguments
9595
populateBuildProperties(opts) // build properties initial set
@@ -294,8 +294,8 @@ options:
294294
System.exit(1)
295295
}
296296

297-
if(opts.v && args.size() > 1)
298-
println "** Input args = ${args[1..-1].join(' ')}"
297+
if(opts.v && args.size() > 0)
298+
println "** Input args = ${args[0..-1].join(' ')}"
299299

300300
if( (!opts.cch && opts.ccp) || (opts.cch && !opts.ccp) ) {
301301
println "** --cccHost and --cccPort options are mutual"
@@ -490,7 +490,7 @@ def populateBuildProperties(def opts) {
490490

491491
props.topicBranchBuild = (props.applicationCurrentBranch.equals(props.mainBuildBranch)) ? null : 'true'
492492
props.applicationBuildGroup = ((props.applicationCurrentBranch) ? "${props.application}-${props.applicationCurrentBranch}" : "${props.application}") as String
493-
props.applicationBuildLabel = ("build." + ( (props.buildOutputTSformat) ? startTime.format("${props.buildOutputTSformat}") : "${props.startTime}" ) ) as String
493+
props.applicationBuildLabel = ("build.${props.startTime}") as String
494494
props.applicationCollectionName = ((props.applicationCurrentBranch) ? "${props.application}-${props.applicationCurrentBranch}" : "${props.application}") as String
495495
props.applicationOutputsCollectionName = "${props.applicationCollectionName}-outputs" as String
496496

@@ -526,6 +526,7 @@ def populateBuildProperties(def opts) {
526526
* - build text file: Contains a list of programs from a text file. Provide a *.txt build file argument.
527527
*/
528528
def createBuildList() {
529+
println "************* Creation and processing of the build list *************"
529530

530531
// using a set to create build list to eliminate duplicate files
531532
Set<String> buildSet = new HashSet<String>()
@@ -671,7 +672,7 @@ def createBuildList() {
671672

672673

673674
def finalizeBuildProcess(Map args) {
674-
675+
println "***************** Finalization of the build process *****************"
675676

676677
def buildReport = BuildReportFactory.getBuildReport()
677678
def buildResult = null

languages/Assembler.groovy

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,14 @@ def createAssemblerSQLTranslatorCommand(String buildFile, LogicalFile logicalFil
213213
assembler_SQLtranslator.dd(new DDStatement().name("SYSCIN").dsn("&&SYSCIN").options('cyl space(5,5) unit(vio) new').pass(true))
214214

215215
// steplib
216-
assembler_SQLtranslator.dd(new DDStatement().name("TASKLIB").dsn(props.SDSNLOAD).options("shr"))
216+
if (props.SDSNEXIT) {
217+
assembler_SQLtranslator.dd(new DDStatement().name("TASKLIB").dsn(props.SDSNEXIT).options("shr"))
218+
assembler_SQLtranslator.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
217219

220+
} else {
221+
assembler_SQLtranslator.dd(new DDStatement().name("TASKLIB").dsn(props.SDSNLOAD).options("shr"))
222+
}
223+
218224
assembler_SQLtranslator.dd(new DDStatement().name("SYSUT1").options(props.assembler_tempOptions))
219225

220226
// sysprint

languages/Cobol.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ def createCompileCommand(String buildFile, LogicalFile logicalFile, String membe
261261
compile.dd(new DDStatement().name("TASKLIB").dsn(props."SIGYCOMP_$compilerVer").options("shr"))
262262
if (buildUtils.isCICS(logicalFile))
263263
compile.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
264-
if (buildUtils.isSQL(logicalFile))
264+
if (buildUtils.isSQL(logicalFile)) {
265+
if (props.SDSNEXIT) compile.dd(new DDStatement().dsn(props.SDSNEXIT).options("shr"))
265266
compile.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
267+
}
266268

267269
if (props.SFELLOAD)
268270
compile.dd(new DDStatement().dsn(props.SFELLOAD).options("shr"))

languages/MFS.groovy

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.ibm.dbb.dependency.*
44
import com.ibm.dbb.build.*
55
import groovy.transform.*
66

7-
// docs: https://www.ibm.com/support/knowledgecenter/en/SSEPH2_13.1.0/com.ibm.ims13.doc.sur/ims_mfslangbatchmd.htm
7+
// docs: https://www.ibm.com/docs/en/ims/14.1.0?topic=dfsupaa0-running-utility-in-standard-mode
88

99
// define script properties
1010
@Field BuildProperties props = BuildProperties.getInstance()
@@ -34,14 +34,17 @@ sortedList.each { buildFile ->
3434
File logFile = new File( props.userBuild ? "${props.buildOutDir}/${member}.log" : "${props.buildOutDir}/${member}.mfs.log")
3535
if (logFile.exists())
3636
logFile.delete()
37-
MVSExec phase1 = createPhase1Command(buildFile, member, logFile)
38-
MVSExec phase2 = createPhase2Command(buildFile, member, logFile)
39-
37+
38+
// execution flags
39+
phase2Execution = props.getFileProperty('mfs_phase2Execution', buildFile)
40+
4041
// execute mvs commands in a mvs job
4142
MVSJob job = new MVSJob()
4243
job.start()
4344

44-
// preprocess mfs map
45+
// generate phase1 command
46+
MVSExec phase1 = createPhase1Command(buildFile, member, logFile)
47+
4548
int rc = phase1.execute()
4649
int maxRC = props.getFileProperty('mfs_phase1MaxRC', buildFile).toInteger()
4750

@@ -53,19 +56,24 @@ sortedList.each { buildFile ->
5356
buildUtils.updateBuildResult(errorMsg:errorMsg,logs:["${member}.log":logFile])
5457
}
5558
else {
59+
// generate phase2 command
60+
if (phase2Execution && phase2Execution.toBoolean()) {
61+
62+
MVSExec phase2 = createPhase2Command(buildFile, member, logFile)
63+
64+
rc = phase2.execute()
65+
maxRC = props.getFileProperty('mfs_phase2MaxRC', buildFile).toInteger()
5666

57-
rc = phase2.execute()
58-
maxRC = props.getFileProperty('mfs_phase2MaxRC', buildFile).toInteger()
67+
if (rc > maxRC) {
68+
String errorMsg = "*! The phase 2 return code ($rc) for $buildFile exceeded the maximum return code allowed ($maxRC)"
69+
println(errorMsg)
70+
props.error = "true"
71+
buildUtils.updateBuildResult(errorMsg:errorMsg,logs:["${member}.log":logFile])
72+
}
5973

60-
if (rc > maxRC) {
61-
String errorMsg = "*! The phase 2 return code ($rc) for $buildFile exceeded the maximum return code allowed ($maxRC)"
62-
println(errorMsg)
63-
props.error = "true"
64-
buildUtils.updateBuildResult(errorMsg:errorMsg,logs:["${member}.log":logFile])
6574
}
6675
}
6776

68-
6977
// clean up passed DD statements
7078
job.stop()
7179

@@ -81,6 +89,9 @@ sortedList.each { buildFile ->
8189

8290
/*
8391
* createPhase1Command - creates a MVSExec command for preprocessing the MFS Map (buildFile)
92+
*
93+
* defines the MFS map as output.
94+
*
8495
*/
8596
def createPhase1Command(String buildFile, String member, File logFile) {
8697

@@ -91,11 +102,15 @@ def createPhase1Command(String buildFile, String member, File logFile) {
91102
// define the MVSExec command to compile the mfs map
92103
MVSExec mfsPhase1 = new MVSExec().file(buildFile).pgm(props.mfs_phase1processor).parm(parameters)
93104

94-
mfsPhase1.dd(new DDStatement().name("SYSIN").dsn("${props.mfs_srcPDS}($member)").options("shr").report(true))
105+
// add DD statements to the mfsPhase2 command
106+
String deployType = buildUtils.getDeployType("mfs", buildFile, null)
107+
108+
mfsPhase1.dd(new DDStatement().name("SYSIN").dsn("${props.mfs_srcPDS}($member)").options("shr").report(true).output(true).deployType(deployType))
95109

96-
mfsPhase1.dd(new DDStatement().name("REFIN").dsn(props.REFERAL).options("shr"))
110+
mfsPhase1.dd(new DDStatement().name("REFIN").dsn("&&REFERAL").options("${props.mfs_tempOptions} dir(10) lrecl(80) blksize(800) recfm(f,b)"))
97111
mfsPhase1.dd(new DDStatement().name("REFOUT").dsn("&&TEMPPDS").options("${props.mfs_tempOptions} dir(5) lrecl(80) recfm(f,b)"))
98-
mfsPhase1.dd(new DDStatement().name("REFRD").dsn(props.REFERAL).options("shr"))
112+
mfsPhase1.dd(new DDStatement().name("REFRD").dsn("&&TEMPPDS").options("cyl space(5,5) unit(vio) old"))
113+
mfsPhase1.dd(new DDStatement().dsn("&&REFERAL").options("cyl space(5,5) unit(vio) old"))
99114

100115
mfsPhase1.dd(new DDStatement().name("SYSPRINT").options(props.mfs_tempOptions))
101116
mfsPhase1.dd(new DDStatement().name("SEQBLKS").dsn("&&SEQBLK").options(props.mfs_tempOptions).pass(true))
@@ -128,10 +143,7 @@ def createPhase2Command(String buildFile, String member, File logFile) {
128143
// define the MVSExec command for MFS Language Utility - Phase 2
129144
MVSExec mfsPhase2 = new MVSExec().file(buildFile).pgm(props.mfs_phase2processor).parm(parameters)
130145

131-
// add DD statements to the mfsPhase2 command
132-
String deployType = buildUtils.getDeployType("mfs", buildFile, null)
133-
134-
mfsPhase2.dd(new DDStatement().name("FORMAT").dsn(props.mfs_tformatPDS).options("shr").output(true).deployType(deployType))
146+
mfsPhase2.dd(new DDStatement().name("FORMAT").dsn(props.mfs_tformatPDS).options("shr"))
135147
// mfsPhase2.dd(new DDStatement().name("DUMMY").dsn("${props.PROCLIB}(FMTCPY)").options("shr"))
136148
mfsPhase2.dd(new DDStatement().name("TASKLIB").dsn(props.SDFSRESL).options("shr"))
137149

languages/PLI.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ def createCompileCommand(String buildFile, LogicalFile logicalFile, String membe
222222
compile.dd(new DDStatement().name("TASKLIB").dsn(props."IBMZPLI_$compilerVer").options("shr"))
223223
if (buildUtils.isCICS(logicalFile))
224224
compile.dd(new DDStatement().dsn(props.SDFHLOAD).options("shr"))
225-
if (buildUtils.isSQL(logicalFile))
225+
if (buildUtils.isSQL(logicalFile)) {
226+
if (props.SDSNEXIT) compile.dd(new DDStatement().dsn(props.SDSNEXIT).options("shr"))
226227
compile.dd(new DDStatement().dsn(props.SDSNLOAD).options("shr"))
228+
}
227229
if (props.SFELLOAD)
228230
compile.dd(new DDStatement().dsn(props.SFELLOAD).options("shr"))
229231

0 commit comments

Comments
 (0)