public class MvsJobSubmitter
extends java.lang.Object
For more information on internal reader, refer to the Internal Reader
Facility section in z/OS JES Application Programming, SA23-2240
and the Dynamic allocation chapter in z/OS V1R12.0 MVS Programming
Authorized Assembler Service Guide
.
| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_RDR_CLASS |
static boolean |
DEFAULT_RDR_FIXED_RECFM |
static int |
DEFAULT_RDR_LRECL |
static int |
MAX_JCL_SYMBOL_NAME_LEN
Maximum length allowed for a JCL symbol name
|
| 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.
|
MvsJobSubmitter(int rdrLrecl,
boolean rdrIsFixedRecfm,
char rdrClass,
java.lang.String subsystem,
java.util.List<java.lang.String> symbolNames)
Construct and open an internal reader using JES symbols and 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 |
getJobCorrelator()
Return the job correlator for the submitted job.
|
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 static final int MAX_JCL_SYMBOL_NAME_LEN
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 MvsJobSubmitter(int rdrLrecl,
boolean rdrIsFixedRecfm,
char rdrClass,
java.lang.String subsystem,
java.util.List<java.lang.String> symbolNames)
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.subsystem - JES subsystem name (case-sentive). Default to the primary subsystem if null.symbolNames - a list of JES symbol names.
JES symbols used for submitting a job must conform to JCL rules.
If "*" is specified, all symbols available to the current task and
conform to JCL limitations will be passed to the internal reader.RcException - if unable to allocate internal reader.
RC containing S99Error in the high order 16 bits and S99Info in the low order 16 bits.
To interpret error reason code, refer to the Dynamic allocation chapter
in z/OS V1R12.0 MVS Programming Authorized Assembler Service Guide.
java.io.IOException - if unable to open internal reader.java.lang.IllegalArgumentException - if the length of a symbol name is invalidjava.lang.NullPointerException - if a symbol name is nullpublic char getRdrClass()
public int getRdrLrecl()
public boolean isRdrFixedRecfm()
public void write(java.lang.String line)
throws java.io.IOException
line - job recordjava.io.IOExceptionpublic void write(byte[] bytes)
throws java.io.IOException
bytes - the byte array to be writtenjava.io.IOExceptionjava.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.IOExceptionjava.lang.IllegalStateException - if the reader is not openpublic void close()
throws java.io.IOException
java.io.IOExceptionjava.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.public java.lang.String getJobCorrelator()
throws java.io.IOException
write(String)
and/or write(byte[], int, int) are complete. It will issue a close() if necessary.java.io.IOException