-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.ibm.com:IBMDBB/PublicSamples
- Loading branch information
Showing
36 changed files
with
951 additions
and
681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,49 @@ | ||
import com.ibm.dbb.build.* | ||
|
||
// Change the following variables to match your system | ||
hlq = "USER" | ||
sourceDir = "/u/user/build" | ||
macLib = "SYS1.MACLIB" | ||
//userMacLib = "USER.MACLIB" //Uncomment if needed | ||
|
||
println("Creating ${hlq}.HASRC. . .") | ||
CreatePDS createPDSCmd = new CreatePDS(); | ||
createPDSCmd.setDataset("${hlq}.HASRC"); | ||
createPDSCmd.setOptions("tracks space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)"); | ||
createPDSCmd.create(); | ||
|
||
println("Creating ${hlq}.HAMOD. . .") | ||
createPDSCmd.setDataset("${hlq}.HAMOD"); | ||
createPDSCmd.setOptions("tracks space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)"); | ||
createPDSCmd.create(); | ||
|
||
// copy program to PDS | ||
println("Copying hello.asm to USER.HASRC") | ||
new CopyToPDS().file(new File("hello.asm")).dataset("USER.HASRC").member("HELLO").execute() | ||
println("Copying hello.asm to ${hlq}.HASRC") | ||
new CopyToPDS().file(new File("${sourceDir}/hello.asm")).dataset("${hlq}.HASRC").member("HELLO").execute() | ||
|
||
// compile the build file | ||
println("Compiling hello.asm") | ||
// assemble the build file | ||
println("Assembling hello.asm") | ||
|
||
// define the MVSExec command to compile the file | ||
def compile = new MVSExec().file("hello.asm").pgm("ASMA90").parm("") | ||
def compile = new MVSExec().file("${sourceDir}/hello.asm").pgm("ASMA90").parm("") | ||
|
||
// add DD statements to the MVSExec command | ||
compile.dd(new DDStatement().name("SYSIN").dsn("USER.HASRC(HELLO)").options("shr").report(true)) | ||
compile.dd(new DDStatement().name("SYSLIN").dsn("USER.HAMOD(HELLO)").options("shr").output(true)) | ||
compile.dd(new DDStatement().name("SYSIN").dsn("${hlq}.HASRC(HELLO)").options("shr").report(true)) | ||
compile.dd(new DDStatement().name("SYSLIN").dsn("${hlq}.HAMOD(HELLO)").options("shr").output(true)) | ||
compile.dd(new DDStatement().name("SYSPRINT").options("cyl space(5,5) unit(vio) new")) | ||
compile.dd(new DDStatement().name("SYSUT1").options("cyl space(5,5) unit(vio) new")) | ||
|
||
// add a syslib to the compile command with optional CICS concatenation | ||
compile.dd(new DDStatement().name("SYSLIB").dsn("USER.HAMAC").options("shr")) | ||
compile.dd(new DDStatement().dsn("SYS1.MACLIB").options("shr")) | ||
compile.dd(new DDStatement().name("SYSLIB").dsn("${macLib}").options("shr")) | ||
//compile.dd(new DDStatement().dsn("${userMacLib}").options("shr")) //Uncomment if user maclib needed | ||
|
||
// log | ||
compile.copy(new CopyToHFS().ddName("SYSPRINT").file(new File("/u/user/build/hello.log"))) | ||
compile.copy(new CopyToHFS().ddName("SYSPRINT").file(new File("${sourceDir}/hello_asm.log"))) | ||
|
||
// execute the MVSExec compile command | ||
def rc = compile.execute() | ||
|
||
if (rc > 4) | ||
println("Compile failed! RC=$rc") | ||
println("Assembly failed! RC=$rc") | ||
else | ||
println("Compile successful! RC=$rc") | ||
println("Assembly successful! RC=$rc") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.