Defining in composer
You can also use the composer command line to define jobs for the agent for z/OS.
The JSDL tagging changes depending on whether in the job
the JCL destined for JES is defined by reference
or by
definition
.
Defining jobs that point to the JCL location in z/OS
The
following example shows the definition of a job named JCLJOBREF
.
The
workstation is an agent for z/OS named
ZAGE_ZOS1092
.
The JSDL coding points to the JCL location in the z/OS system.
ZAGE_ZOS1092#JCLJOBREF
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jmgr:submitJobFromJSDL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jmgr="http://www.abc.com/xmlns/prod/scheduling/1.0/JobManager"
xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdljcl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdljcl"
xmlns:sdo="http://www.eclipse.org/emf/2003/SDO">
<jmgr:JobDefinitionDocument>
<jsdl:jobDefinition name="JCL">
<jsdl:application name="jcl">
<jsdljcl:jcl xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:JCLParameters xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:jcl xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:byRefOrByDef xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:byReference xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:dataset xsi:type="sdo:EDataObjectAnyType">TWSTST.TWSA.JOBLIB</jsdljcl:dataset>
<jsdljcl:member xsi:type="sdo:EDataObjectAnyType">JOB1</jsdljcl:member>
</jsdljcl:byReference>
</jsdljcl:byRefOrByDef>
</jsdljcl:jcl>
</jsdljcl:JCLParameters>
<jsdljcl:JOBParameters xsi:type="sdo:EDataObjectAnyType">
<jsdljcl:jobStreamName xsi:type="sdo:EDataObjectAnyType">JOBS/jsdljcl:jobStreamName>
<jsdljcl:inputArrival xsi:type="sdo:EDataObjectAnyType">201206131200
</jsdljcl:inputArrival>
</jsdljcl:JOBParameters>
</jsdljcl:jcl>
</jsdl:application>
<jsdl:resources/>
</jsdl:jobDefinition>
</jmgr:JobDefinitionDocument>
<jmgr:Alias>ZA86_ZOS1354#JOBS.PROVA.JNUM-622656411</jmgr:Alias>
<jmgr:JobId>5e2efa42-1dab-31eb-a8f1-6aaa413a4cec</jmgr:JobId>
<jmgr:ClientNotifyURI>https://ts6087.enervt.com:31116/JobManagerRESTWeb/JobScheduler/job
</jmgr:ClientNotifyURI>
<jmgr:ClientNotifyURI>https:/ts6087.enervt.com:31116/JobManagerRESTWeb/JobScheduler/job
</jmgr:ClientNotifyURI>
</jmgr:submitJobFromJSDL>
- <jsdl:application name="jcl">
- Specifies that the job is an agent for z/OS job.
- <jsdljcl:byReference>
- Specifies that the JCL that will be run by JES resides in the z/OS system and only the coordinates of its location are specified here.
- <jsdljcl:dataset xsi:type="sdo:EDataObjectAnyType">...</jsdljcl:dataset>
- Specifies the name of the data set where the JCL is stored. This name can be up to 44
characters long and is optional. If the data set name is not specified, the agent for z/OS will search for the
member name in the data set concatenation library declared for the agent at installation
time.Important: Write the keyword also when you do not provide a data set name. The element must be present regardless of whether there is a value or not.
- <jsdljcl:member xsi:type="sdo:EDataObjectAnyType">...</jsdljcl:member>
- Specifies the name of the JCL member in the data set. This name can be up to 8 characters long and is required.
- <jsdljcl:JOBParameters>
- In this section you are required to provide the:
- job stream name
- input arrival time
Defining jobs that include the JCL definition
The
following example shows the definition of a job named JCLJOB
.
The
workstation is an agent for z/OS named
ZAGE_ZOS1092
.
The JCL statement is embedded in the JSDL definition.
ZAGE_ZOS1092#JCLJOB
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdljcl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdljcl">
<jsdl:application name="jcl">
<jsdljcl:jcl>
<jsdljcl:JCLParameters>
<jsdljcl:jcl>
<jsdljcl:byRefOrByDef>
<jsdljcl:byDefinition>
<jsdljcl:jclDefinition>
/NORMAL JOB,'TWS JOB',CLASS=A,MSGCLASS=A,
//MSGLEVEL=(1,1)
//*
//STEP1 EXEC PGM=IEFBR14
</jsdljcl:jclDefinition>
</jsdljcl:byDefinition>
</jsdljcl:byRefOrByDef>
</jsdljcl:jcl>
</jsdljcl:JCLParameters>
<jsdljcl:JOBParameters>
<jsdljcl:jobStreamName>${tws.jobstream.name}</jsdljcl:jobStreamName>
<jsdljcl:inputArrival>${tws.job.ia}</jsdljcl:inputArrival>
</jsdljcl:JOBParameters>
</jsdljcl:jcl>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Sample JCL Job Definition"
- <jsdl:application name="jcl">
- Specifies that the job is an agent for z/OS job.
- <jsdljcl:byDefinition>
- Specifies that the JCL that will be run by JES is defined within the JSDL.
- <jsdljcl:jclDefinition>
- Contains the entire JCL definition.
- <jsdljcl:JOBParameters>
- In this section you are required to provide the:
- job stream name
- input arrival time
Specifying that the JCL contains variables that must be resolved at runtime
If
the JCL, without regard to whether it is included in the job definition
or is referenced by its location in z/OS, includes variables that
will be resolved at runtime by the agent, it must be declared in the jobDefinition
section
of the JSDL definition.
The following example is the definition shown in Defining jobs that include the JCL definition with the addition of the keyword that specifies that there are variables to be resolved at runtime:
ZAGE_ZOS1092#JCLJOB
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl"
xmlns:jsdljcl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdljcl"
XMLSchema:text="resolveVariableTable" name="jcl">
<jsdl:application name="jcl">
<jsdljcl:jcl>
<jsdljcl:JCLParameters>
<jsdljcl:jcl>
<jsdljcl:byRefOrByDef>
<jsdljcl:byDefinition>
<jsdljcl:jclDefinition>
/NORMAL JOB,'TWS JOB',CLASS=A,MSGCLASS=A,
//MSGLEVEL=(1,1)
//*
//STEP1 EXEC PGM=&MODULE
</jsdljcl:jclDefinition>
</jsdljcl:byDefinition>
</jsdljcl:byRefOrByDef>
</jsdljcl:jcl>
</jsdljcl:JCLParameters>
<jsdljcl:JOBParameters>
<jsdljcl:jobStreamName>${tws.jobstream.name}</jsdljcl:jobStreamName>
<jsdljcl:inputArrival>${tws.job.ia}</jsdljcl:inputArrival>
</jsdljcl:JOBParameters>
</jsdljcl:jcl>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Sample JCL Job Definition"
- XMLSchema:text="resolveVariableTable"
- Specifies that there are variables in the JCL that need to be
resolved at runtime. When you submit the job to the agent for z/OS,
the definition is transmitted to the agent, together with the table
that contains the variable and the corresponding value, where it is
processed before being passed on to JES.Attention: Do not misuse this keyword. If there is no correspondence between the keyword and the presence or absence of variables, the job will fail.