Package com.ibm.dbb.build
Class MVSExec
- java.lang.Object
-
- com.ibm.dbb.build.AbstractExec
-
- com.ibm.dbb.build.MVSExec
-
- All Implemented Interfaces:
IExecute
public class MVSExec extends AbstractExec
The MVSExec command is used to execute a program on System z.Usage:
MVSExec mvsExec = new mvsExec(); mvsExec.setPgm("DFSUNUB0"); mvsExec.setParm("TEST"); mvsExec.addDDStatment("UTPRINT", null, "tracks space(5,5) unit(vio) new", false); mvsExec.addDDStatment("FORMAT", HLQ + ".TFORMAT", "shr", false); mvsExec.addDDStatment("TASKLIB", "JAZZ00.IMS11.SDFSRESL", "shr", false); CopyToHFS copyToHFS = new CopyToHFS(); copyToHFS.setDdName("UTPRINT"); copyToHFS.setFile(new File(WORK_DIR + "/logs/" + MEMBER + ".log")); mvsExec.addCopyToHFS(copyToHFS); int rc = mvsExec.execute();
-
-
Constructor Summary
Constructors Constructor Description MVSExec()Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCopyToHFS(CopyToHFS copy)Adds a CopyToHFS command that will be executed after the program is executed but before the DD statements are freed.MVSExeccopy(CopyToHFS copy)Adds a CopyToHFS command that will be executed after the program is executed but before the DD statements are freed.MVSExecddnames(java.lang.String ddnames)Set the DDs required by the MVS moduleMVSExecfile(java.lang.String file)Set the file that this command is processing.MVSExecfreePgmAllocatedDDs(boolean freePgmAllocatedDDs)Set whether the DDs allocated by the program should be freed.booleanisFreePgmAllocatedDDs()Returntrueif the DDs allocated by programs should be freed.MVSExecparm(java.lang.String parm)Set the parameters to be passed to the MVS moduleMVSExecpgm(java.lang.String pgm)Set the name of MVS module to executevoidsetDdnames(java.lang.String ddnames)Set the DDs required by the MVS modulevoidsetFreePgmAllocatedDDs(boolean freePgmAllocatedDDs)Set whether the DDs allocated by the program should be freed.voidsetParm(java.lang.String parm)Set the parameters to be passed to the MVS modulevoidsetPgm(java.lang.String pgm)Set the name of MVS module to execute-
Methods inherited from class com.ibm.dbb.build.AbstractExec
addAllDDStatements, addDDStatement, addDDStatement, addDDStatment, dd, execute, getDDStatements, getFile, setFile
-
-
-
-
Method Detail
-
addCopyToHFS
public void addCopyToHFS(CopyToHFS copy)
Adds a CopyToHFS command that will be executed after the program is executed but before the DD statements are freed.Useful for copying/storing compile log files from temporary PDS to HFS files.
- Parameters:
copy- CopyToHFS command
-
setPgm
public void setPgm(java.lang.String pgm)
Set the name of MVS module to execute- Parameters:
pgm- the name of the MVS module
-
setParm
public void setParm(java.lang.String parm)
Set the parameters to be passed to the MVS module- Parameters:
parm- the parameters
-
setDdnames
public void setDdnames(java.lang.String ddnames)
Set the DDs required by the MVS module- Parameters:
ddnames- the DD names
-
pgm
public MVSExec pgm(java.lang.String pgm)
Set the name of MVS module to execute- Parameters:
pgm- the name of the MVS module- Returns:
- this instance
-
parm
public MVSExec parm(java.lang.String parm)
Set the parameters to be passed to the MVS module- Parameters:
parm- the parameters- Returns:
- this instance
-
ddnames
public MVSExec ddnames(java.lang.String ddnames)
Set the DDs required by the MVS module- Parameters:
ddnames- the DD names- Returns:
- this instance
-
copy
public MVSExec copy(CopyToHFS copy)
Adds a CopyToHFS command that will be executed after the program is executed but before the DD statements are freed.Useful for copying/storing compile log files from temporary PDS to HFS files.
- Parameters:
copy- CopyToHFS command- Returns:
- this instance
-
file
public MVSExec file(java.lang.String file)
Set the file that this command is processing.- Parameters:
file- the relative path of the file.- Returns:
- this instance
-
isFreePgmAllocatedDDs
public boolean isFreePgmAllocatedDDs()
Returntrueif the DDs allocated by programs should be freed. Default value isfalse- Returns:
trueif the DDs allocated by programs should be freed
-
setFreePgmAllocatedDDs
public void setFreePgmAllocatedDDs(boolean freePgmAllocatedDDs)
Set whether the DDs allocated by the program should be freed. Some compilers (C and REXX compilers) often allocate temporary DD when another files are included, these DDs are not freed by the compilers. In such case, set this totrueso that these DDs are freed after the compiler has completed.- Parameters:
freePgmAllocatedDDs-trueorfalse
-
freePgmAllocatedDDs
public MVSExec freePgmAllocatedDDs(boolean freePgmAllocatedDDs)
Set whether the DDs allocated by the program should be freed. Some compilers (C and REXX compilers) often allocate temporary DD when another files are included, these DDs are not freed by the compilers. In such case, set this totrueso that these DDs are freed after the compiler has completed.- Parameters:
freePgmAllocatedDDs-trueorfalse- Returns:
- this instance of MVSExec
-
-