Package com.ibm.dbb.build
Class JCLExec
- java.lang.Object
-
- com.ibm.dbb.build.JCLExec
-
@Deprecated public class JCLExec extends java.lang.Object implements IExecute2
Deprecated.As of release 2.0.1, replaced byJobExec
.Submit a JCL in a member of a data set, or a file on HFS, or an internal memory. Example of usage:
JCLExec exec = new JCLExec() exec.confDir('/var/dbb_1.0.1/conf') def rc = exec.dataset('USER.JCL').member('SAMPLE').execute() println "Job '${exec.getSubmittedJobId()}' was submitted successfully with maxRC = ${exec.maxRC}" exec.getAllDDNames().each({ ddName -> println "DD Name: $ddName" def file = new File("/u/user/sample/${ddName}.output") exec.saveOutput(ddName, file, null) })
-
-
Constructor Summary
Constructors Constructor Description JCLExec()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JCLExec
confDir(java.lang.String confDir)
Deprecated.Set the configuration directory where jobOutput REXX script could be foundJCLExec
dataset(java.lang.String dataset)
Deprecated.Set the data set contains the JCL to be submittedint
execute()
Deprecated.Submit a JCL and wait for the job has been submittedint
executeAndWaitFor(int timeout, java.util.concurrent.TimeUnit unit)
Deprecated.Submit a JCL and wait for a certain time before returnJCLExec
file(java.io.File file)
Deprecated.Set the file on the HFS that contains the JCL to be submittedjava.util.List<java.lang.String>
getAllDDNames()
Deprecated.Return all output DD names of the submitted jobjava.util.List<java.lang.String>
getAllDDNames(boolean qualified)
Deprecated.Return all qualified output DD names of the submitted job.java.lang.String
getConfDir()
Deprecated.Returns the configuration directory where jobOutput REXX script could be foundjava.lang.String
getDataset()
Deprecated.Return the data set that contains the JCL to be submittedjava.io.File
getFile()
Deprecated.Return the file on the HFS that contains the JCL to be submittedjava.lang.String
getJclEncoding()
Deprecated.Return the encoding of the JCLjava.lang.String
getMaxRC()
Deprecated.Return the Max RC of the submitted jobjava.lang.String
getMember()
Deprecated.Return the member in a data set that contains the JCL to be submittedjava.lang.String
getSubmittedJobId()
Deprecated.Returns the ID of the submitted job in form of <jobName>(<jobId>)java.lang.String
getSubmittedJobName()
Deprecated.Returns the name of the submitted jobjava.lang.String
getText()
Deprecated.Return the JCL to be submittedjava.lang.String
getVolser()
Deprecated.Return the volume serial of the data setJCLExec
jclEncoding(java.lang.String jclEncoding)
Deprecated.Set the encoding of the JCLJCLExec
member(java.lang.String member)
Deprecated.Set the member in a data set that contains the JCL to be submittedvoid
saveOutput(java.io.File file)
Deprecated.Save the output of the submitted job in a file on HFSvoid
saveOutput(java.io.File file, java.lang.String encoding)
Deprecated.Save the output of the submitted job in a file on HFSvoid
saveOutput(java.lang.String ddName, java.io.File file)
Deprecated.Save the output of a specific DD in a file on HFSvoid
saveOutput(java.lang.String ddName, java.io.File file, boolean removeASA)
Deprecated.Save the output of a specific DD in a file on HFSvoid
saveOutput(java.lang.String ddName, java.io.File file, java.lang.String encoding)
Deprecated.Save the output of a specific DD in a file on HFSvoid
saveOutput(java.lang.String ddName, java.io.File file, java.lang.String encoding, boolean removeASA)
Deprecated.Save the output of a specific DD in a file on HFSvoid
saveOutput(java.lang.String ddName, java.lang.String sourceEncoding, java.io.File file, java.lang.String targetEncoding, boolean removeASA)
Deprecated.Save the output of a specific DD in a file on HFSvoid
setConfDir(java.lang.String confDir)
Deprecated.Set the configuration directory where jobOutput REXX script could be foundvoid
setDataset(java.lang.String dataset)
Deprecated.Set the data set contains the JCL to be submittedvoid
setFile(java.io.File file)
Deprecated.Set the file on the HFS that contains the JCL to be submittedvoid
setJclEncoding(java.lang.String jclEncoding)
Deprecated.Set the encoding of the JCLvoid
setMember(java.lang.String member)
Deprecated.Set the member in a data set that contains the JCL to be submittedvoid
setText(java.lang.String text)
Deprecated.Set the content of the JCL to be submittedvoid
setVolser(java.lang.String volser)
Deprecated.Specify the volume serial of the data setJCLExec
text(java.lang.String text)
Deprecated.Set the content of the JCL to be submittedJCLExec
volser(java.lang.String volser)
Deprecated.Specify the volume serial of the data set
-
-
-
Method Detail
-
executeAndWaitFor
public int executeAndWaitFor(int timeout, java.util.concurrent.TimeUnit unit) throws BuildException
Deprecated.Submit a JCL and wait for a certain time before return- Specified by:
executeAndWaitFor
in interfaceIExecute2
- Parameters:
timeout
- the amount of time to waitunit
- the timeout unit- Returns:
- 0 if the job has been submitted successfully, or 1 if a timeout has been reached
- Throws:
BuildException
- if an error occurred
-
execute
public int execute() throws BuildException
Deprecated.Submit a JCL and wait for the job has been submitted- Specified by:
execute
in interfaceIExecute
- Returns:
- always 0 unless an exception occurred
- Throws:
BuildException
- if an error occurred
-
getSubmittedJobId
public java.lang.String getSubmittedJobId()
Deprecated.Returns the ID of the submitted job in form of <jobName>(<jobId>)- Returns:
- the ID of the submitted job
-
getSubmittedJobName
public java.lang.String getSubmittedJobName()
Deprecated.Returns the name of the submitted job- Returns:
- the name of the submitted job
-
getDataset
public java.lang.String getDataset()
Deprecated.Return the data set that contains the JCL to be submitted- Returns:
- the data set that contains the JCL to be submitted
-
setDataset
public void setDataset(java.lang.String dataset)
Deprecated.Set the data set contains the JCL to be submitted- Parameters:
dataset
- the data set contains the JCL to be submitted
-
dataset
public JCLExec dataset(java.lang.String dataset)
Deprecated.Set the data set contains the JCL to be submitted- Parameters:
dataset
- the data set contains the JCL to be submitted- Returns:
- this instance of the JCLExec
-
getMember
public java.lang.String getMember()
Deprecated.Return the member in a data set that contains the JCL to be submitted- Returns:
- the member in a data set that contains the JCL to be submitted
-
setMember
public void setMember(java.lang.String member)
Deprecated.Set the member in a data set that contains the JCL to be submitted- Parameters:
member
- the member in a data set that contains the JCL to be submitted
-
member
public JCLExec member(java.lang.String member)
Deprecated.Set the member in a data set that contains the JCL to be submitted- Parameters:
member
- the member in a data set that contains the JCL to be submitted- Returns:
- this instance of the JCLExec
-
getFile
public java.io.File getFile()
Deprecated.Return the file on the HFS that contains the JCL to be submitted- Returns:
- the file on the HFS that contains the JCL to be submitted
-
setFile
public void setFile(java.io.File file)
Deprecated.Set the file on the HFS that contains the JCL to be submitted- Parameters:
file
- the file on the HFS that contains the JCL to be submitted
-
file
public JCLExec file(java.io.File file)
Deprecated.Set the file on the HFS that contains the JCL to be submitted- Parameters:
file
- the file on the HFS that contains the JCL to be submitted- Returns:
- this instance of the JCLExec
-
getText
public java.lang.String getText()
Deprecated.Return the JCL to be submitted- Returns:
- the JCL to be submitted
-
setText
public void setText(java.lang.String text)
Deprecated.Set the content of the JCL to be submitted- Parameters:
text
- the content of the JCL to be submitted
-
text
public JCLExec text(java.lang.String text)
Deprecated.Set the content of the JCL to be submitted- Parameters:
text
- the content of the JCL to be submitted- Returns:
- this instance of the JCLExec
-
getJclEncoding
public java.lang.String getJclEncoding()
Deprecated.Return the encoding of the JCL- Returns:
- the encoding of the JCL
-
setJclEncoding
public void setJclEncoding(java.lang.String jclEncoding)
Deprecated.Set the encoding of the JCL- Parameters:
jclEncoding
- the encoding of the JCL
-
jclEncoding
public JCLExec jclEncoding(java.lang.String jclEncoding)
Deprecated.Set the encoding of the JCL- Parameters:
jclEncoding
- the encoding of the JCL- Returns:
- this instance of the JCLExec
-
getConfDir
public java.lang.String getConfDir()
Deprecated.Returns the configuration directory where jobOutput REXX script could be found- Returns:
- the configuration directory where jobOutput REXX script could be found
-
setConfDir
public void setConfDir(java.lang.String confDir)
Deprecated.Set the configuration directory where jobOutput REXX script could be found- Parameters:
confDir
- the configuration directory where jobOutput REXX script could be found
-
confDir
public JCLExec confDir(java.lang.String confDir)
Deprecated.Set the configuration directory where jobOutput REXX script could be found- Parameters:
confDir
- the configuration directory where jobOutput REXX script could be found- Returns:
- this instance of the JCLExec
-
getMaxRC
public java.lang.String getMaxRC()
Deprecated.Return the Max RC of the submitted job- Returns:
- the max RC of the submitted job
-
getAllDDNames
public java.util.List<java.lang.String> getAllDDNames() throws BuildException
Deprecated.Return all output DD names of the submitted job- Returns:
- a list of output DD names of the submitted job
- Throws:
BuildException
- if an error occurred
-
getAllDDNames
public java.util.List<java.lang.String> getAllDDNames(boolean qualified) throws BuildException
Deprecated.Return all qualified output DD names of the submitted job. DDNames are returned in the form of "<ddname>:<stepname>:<procstepname>" (ex. JESYSMSG:JES2:, SYSPRINT::LINKMSGT:, SYSTSPRT:DMHENU:GENMSG, SYSPRINT::). The names returned may be used insaveOutput
.- Parameters:
qualified
- whether or not to retrieve qualified DD names- Returns:
- a list of qualified output DD names of the submitted job
- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.io.File file) throws BuildException
Deprecated.Save the output of the submitted job in a file on HFS- Parameters:
file
- the target file to save the output to- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.io.File file, java.lang.String encoding) throws BuildException
Deprecated.Save the output of the submitted job in a file on HFS- Parameters:
file
- the target file to save the output toencoding
- the encoding to be used to write the output- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.lang.String ddName, java.io.File file) throws BuildException
Deprecated.Save the output of a specific DD in a file on HFS- Parameters:
ddName
- the DD contains the output to be savedfile
- the target file to save the output to- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.lang.String ddName, java.io.File file, java.lang.String encoding) throws BuildException
Deprecated.Save the output of a specific DD in a file on HFS- Parameters:
ddName
- the DD contains the output to be savedfile
- the target file to save the output toencoding
- the encoding to be used to write the output- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.lang.String ddName, java.io.File file, boolean removeASA) throws BuildException
Deprecated.Save the output of a specific DD in a file on HFS- Parameters:
ddName
- the DD contains the output to be savedfile
- the target file to save the output toremoveASA
- remove first character (ASA character) of each line of output- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.lang.String ddName, java.io.File file, java.lang.String encoding, boolean removeASA) throws BuildException
Deprecated.Save the output of a specific DD in a file on HFS- Parameters:
ddName
- the DD contains the output to be savedfile
- the target file to save the output toencoding
- the encoding to be used to write the outputremoveASA
- remove first character (ASA character) of each line of output- Throws:
BuildException
- if an error occurred
-
saveOutput
public void saveOutput(java.lang.String ddName, java.lang.String sourceEncoding, java.io.File file, java.lang.String targetEncoding, boolean removeASA) throws BuildException
Deprecated.Save the output of a specific DD in a file on HFS- Parameters:
ddName
- the DD contains the output to be savedsourceEncoding
- the encoding to be used to read the sourcefile
- the target file to save the output totargetEncoding
- the encoding to be used to write the outputremoveASA
- remove first character (ASA character) of each line of output- Throws:
BuildException
- if an error occurred
-
getVolser
public java.lang.String getVolser()
Deprecated.Return the volume serial of the data set- Returns:
- the volume serial of the data set
- Since:
- 1.0.3
-
setVolser
public void setVolser(java.lang.String volser)
Deprecated.Specify the volume serial of the data set- Parameters:
volser
- the volume serial of the data set- Since:
- 1.0.3
-
volser
public JCLExec volser(java.lang.String volser)
Deprecated.Specify the volume serial of the data set- Parameters:
volser
- the volume serial of the data set- Returns:
- the current instance of
com.ibm.dbb.build.JCLExec
- Since:
- 1.0.3
-
-