Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify obtaining the playbackDependency #311

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions languages/ZunitConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ buildUtils.createLanguageDatasets(langQualifier)
LogicalFile logicalFile = buildUtils.createLogicalFile(dependencyResolver, buildFile)

// get playback dependency for bzucfg file from logicalFile
boolean hasPlayback = false
LogicalDependency playbackFile
(hasPlayback, playbackFile) = getPlaybackFile(logicalFile);
LogicalDependency playbackFile = getPlaybackFile(logicalFile);

// Create JCLExec String
String jobcard = props.jobCard.replace("\\n", "\n")
Expand All @@ -66,7 +64,7 @@ zunitParms = props.getFileProperty('zunit_bzuplayParms', buildFile)
jcl += """\
// PARM=('$zunitParms')
"""
if (hasPlayback) { // bzucfg contains reference to a playback file
if (playbackFile != null) { // bzucfg contains reference to a playback file
jcl +=
"//REPLAY.BZUPLAY DD DISP=SHR, \n" +
"// DSN=${props.zunit_bzuplayPDS}(${playbackFile.getLname()}) \n"
Expand Down Expand Up @@ -225,9 +223,7 @@ def getPlaybackFile(LogicalFile logicalFile) {
LogicalDependency playbackDependency = logicalFile.getLogicalDependencies().find {
it.getLibrary() == "SYSPLAY"
}
if (playbackDependency) {
return [true, playbackDependency]
}
return playbackDependency
}

/**
Expand Down