public class MvsJobSubmitter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_RDR_CLASS |
static boolean |
DEFAULT_RDR_FIXED_RECFM |
static int |
DEFAULT_RDR_LRECL |
Constructor and Description |
---|
MvsJobSubmitter()
Construct and open an internal reader using default parameters (recfm=fixed, lrecl=80, rdrclass='*').
|
MvsJobSubmitter(int rdrLrecl,
boolean rdrIsFixedRecfm,
char rdrClass)
Construct and open an internal reader using supplied parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flush and close the input to the internal reader, causing the job to be submitted.
|
java.lang.String |
getJobid()
Return the jobid for the submitted job.
|
char |
getRdrClass()
Return the SYSOUT class of the internal reader allocation.
|
int |
getRdrLrecl()
Return the internal reader allocation's LRECL.
|
boolean |
isRdrFixedRecfm()
Return true of the internal reader has been allocated with a fixed RECFM, false otherwise.
|
void |
write(byte[] bytes)
Write the supplied byte array as a record to the allocated internal reader.
|
void |
write(byte[] bytes,
int offset,
int length)
Write the supplied byte array as a record to the allocated internal reader.
|
void |
write(java.lang.String line)
Write the supplied string as a record to the allocated internal reader.
|
public static final int DEFAULT_RDR_LRECL
public static final boolean DEFAULT_RDR_FIXED_RECFM
public static final char DEFAULT_RDR_CLASS
public MvsJobSubmitter() throws java.io.IOException
java.io.IOException
- if unable to allocate or open the internal readerpublic MvsJobSubmitter(int rdrLrecl, boolean rdrIsFixedRecfm, char rdrClass) throws java.io.IOException
rdrLrecl
- the LRECL of the internal reader allocation.rdrIsFixedRecfm
- if true, records are fixed length.rdrClass
- the sysout class of the internal reader.
If '*' is specified, then the default sysout class for the current
job will be used. Note that is not the class of the submitted job,
which is set on the jobcard or by installation defaults.java.io.IOException
- if unable to allocate or open the internal readerpublic char getRdrClass()
public int getRdrLrecl()
public boolean isRdrFixedRecfm()
public void write(java.lang.String line) throws java.io.IOException
line
- job recordjava.io.IOException
public void write(byte[] bytes) throws java.io.IOException
bytes
- the byte array to be writtenjava.io.IOException
java.lang.IllegalStateException
- if the reader is not openpublic void write(byte[] bytes, int offset, int length) throws java.io.IOException
bytes
- the byte array to be writtenoffset
- the offset from the beginning of the byte arraylength
- the size to be writtenjava.io.IOException
java.lang.IllegalStateException
- if the reader is not openpublic void close() throws java.io.IOException
java.io.IOException
java.lang.IllegalStateException
- if the reader is not openpublic java.lang.String getJobid() throws java.io.IOException
write(String)
and/or write(byte[], int, int)
are
complete. It will issue a close()
if necessary.java.io.IOException
- if there is an error closing, or if a jobid was not created.