Package dev.galasa.zosbatch.spi
Class ZosBatchSuppliedJobcard
java.lang.Object
dev.galasa.zosbatch.spi.ZosBatchSuppliedJobcard
Locates and parses the JOB statement in JCL that already contains its own JOB statement,
and builds the JCL to be submitted. Shared by the z/OS Batch Manager implementations
so that they behave identically.
The first record of the JCL that is not blank and not a comment (//*) must be the JOB statement,
//jobname JOB .... The JOB statement may be continued over more than one record.
A statement is continued when the operand field ends with a comma or a quoted string is not closed.
Each continuation record must start with // followed by a blank.
Comment records within a continued statement are considered part of the statement.
-
Method Summary
Modifier and TypeMethodDescriptionBuild the JCL to be submitted from the JCL that this instance was parsed from.intstatic ZosBatchSuppliedJobcardParse the JOB statement from the supplied JCL.
-
Method Details
-
getJobname
- Returns:
- the job name from the JOB statement, in upper case
-
getEndOffset
public int getEndOffset()- Returns:
- the offset into the parsed JCL immediately after the last record of the JOB statement, including its line terminator if it has one
-
parse
Parse the JOB statement from the supplied JCL. The returned instance represents the supplied JCL, andbuild(String)builds the JCL to be submitted from it.- Parameters:
jcl- the JCL, which must start with a JOB statement- Returns:
- the parsed JOB statement
- Throws:
ZosBatchException- if a valid JOB statement is not found
-
build
Build the JCL to be submitted from the JCL that this instance was parsed from. The JCL is unchanged except that:- if a SYSAFF image is provided and the JCL does not already contain a
/*JOBPARMrecord withSYSAFF=, a/*JOBPARM SYSAFF=[image]record is inserted immediately after the last record of the JOB statement - a line terminator is added to the end if there is not one
- Parameters:
sysaffImageId- the image ID to use for SYSAFF, or null to not add a SYSAFF record- Returns:
- the JCL to be submitted
- if a SYSAFF image is provided and the JCL does not already contain a
-