z/OS Jobs
The following topics describe job attributes for z/OS mainframe operating system jobs:
Job:zOS:Member
The following example shows how to define a Job:zOS:Member job:
"ZF_DOCS" :
{
"Type" : "Folder",
"ControlmServer" : "M2MTROLM",
"FolderLibrary" : "IOAA.CCIDM2.CTM.OPR.SCHEDULE",
"RunAs" : "emuser",
"CreatedBy" : "emuser",
"When" :
{
"RuleBasedCalendars" :
{
"Included" : [ "EVERYDAY" ],
"EVERYDAY" :
{
"Type" : "Calendar:RuleBased",
"When" :
{
"DaysRelation" : "OR",
"WeekDays" : [ "NONE" ],
"MonthDays" : [ "ALL" ]
}
}
}
},
"ZJ_DATA" :
{
"Type" : "Job:zOS:Member",
"SystemAffinity" : "ABCD",
"SchedulingEnvironment" : "PLEX8ALL",
"ControlDCategory" : "SEQL_FILE",
"PreventNCT2" : "Yes",
"MemberLibrary" : "IOA.WORK.JCL",
"SAC" : "Prev",
"CreatedBy" : "emuser",
"RequestNJENode" : "NODE3",
"RunAs" : "emuser",
"StatisticsCalendar": "CALPERIO",
"TaskInformation" :
{
"EmergencyJob" : true,
"RunAsStartedTask" : true,
},
"OutputHandling" :
{
"Operation" : "Copy"
"FromClass" : "X",
"Destination" : "NODE3",
},
"History" :
{
"RetentionDays": "05",
"RetentionGenerations" : "07"
},
"Archiving" :
{
"JobRunsToRetainData" : "4",
"DaysToRetainData" : "1",
"ArchiveSysData" : true
},
"Scheduling" :
{
"MinimumNumberOfTracks" : "5",
"PartitionDataSet" : "fgf"
},
"RerunLimit" :
{
"RerunMember" : "JOBRETRY",
"Units" : "Minutes",
"Every" : "7"
},
"MustEnd" :
{
"Minutes" : "16",
"Hours" : "17",
"Days" : "0"
},
"When" :
{
"WeekDays" : [ "NONE" ],
"Months" : [ "NONE" ],
"MonthDays" : [ "NONE" ],
"DaysRelation" : "OR"
},
"CRS" :
{
"Type" : "Resource:Lock",
"IfFail" : "Keep",
"LockType" : "Shared"
},
"QRS" :
{
"Type" : "Resource:Pool",
"IfFail" : "Keep",
"IfOk" : "Discard",
"Quantity" : "1"
},
"Demo" :
{
"Type" : "StepRange",
"FromProgram" : "STEP1",
"FromProcedure" : "SMPIOA",
"ToProgram" : "STEP8",
"ToProcedure" : "CTBTROLB"
},
"IfCollection:zOS_0" :
{
"Type" : "IfCollection:zOS",
"Ifs" : [
{
"Type" : "If:zOS:AnyProgramStep",
"ReturnCodes" : [ "OK" ],
"Procedure" : "SMPIOA"
},
"OR",
{
"Type" : "If:zOS:EveryProgramStep",
"ReturnCodes" : [ "*$EJ", ">S002" ],
"Procedure" : "SMPIOA"
} ],
"CtbRuleData_2" :
{
"Type" : "Action:ControlMAnalyzerRule",
"Name" : "RULEDEMO",
"Arg" : "3"
}
},
"IfCollection:zOS_1" :
{
"Type" : "IfCollection:zOS",
"Ifs" : [
{
"Type" : "If:zOS:SpecificProgramStep",
"Program" : "Demo",
"ReturnCodes" : [ "*****" ],
"Procedure" : "SMPIOA"
},
"OR",
{
"Type" : "If:zOS:SpecificProgramStep",
"Program" : "STEP5",
"ReturnCodes" : [ ">U0002" ],
"Procedure" : "SMPIOA"
} ],
"IfRerun_2" :
{
"Type" : "Action:Restart",
"FromProgram" : "STEP1",
"FromProcedure" : "SMPIOA",
"ToProgram" : "STEP5",
"ToProcedure" : "CTBTROLB"
"Confirm" : false,
}
}
}
}
The following table describes the Job:zOS:Member job parameters.
Description |
|
---|---|
FolderLibrary |
Defines the location of the Member that contains the job folder. Rules:
|
SystemAffinity |
Defines the identity of the system in which the job must be initiated and executed (in JES2). Rules:
You must type /, followed by the remaining 1–4 characters to define a non-JES3 system. |
SchedulingEnvironment |
Defines the JES2 workload management scheduling environment that is to be associated with the job. Rules:
|
ControlDCategory |
Defines the name of the Control-D Report Decollating Mission Category. If specified, the report-decollating mission is scheduled whenever the job is scheduled under Control-M. Rules:
|
PreventNCT2 |
Determines whether to perform data set cleanup before the original job runs. Valid Values:
|
MemberLibrary |
Defines the location of the Member that contains the JCL, started task procedure, or warning message. Rules:
|
SAC |
(Optional) Determines whether to adjust the logical date for a job converted from a scheduling product other than Control-M. Valid Values:
|
RequestNJENode |
Defines the node in the JES network where the job executes. Rules:
|
StatisticsCalendar |
(Optional) Defines the Control-M periodic calendar used to collect statistics relating to the job. This provides more precise statistical information about the job execution. If the StatisticsCalendar parameter is not defined, the statistics are based on all run times of the job. Rules:
|
TaskInformation |
Defines additional optional settings for the job. |
EmergencyJob |
Determines whether to run the job as an emergency job. Valid Values:
|
RunAsStartedTask |
Determines whether to run the job as a started task. Valid Values:
|
OutputHandling |
Defines how the job output is handled. |
Operation |
Determines the output handling action. Valid Values:
|
FromClass |
Defines the previous class name. |
Destination |
Defines the output name and full pathname to move the output. Do not use an internal Control-M directory or subdirectory. Mandatory if the value for Operation is Copy, Move, or ChangeJobClass. An * indicates the original MSGCLASS for the job output. |
History |
(Optional) Determines how long to retain the job in the History Jobs file. Retention Days and Retention Generations are mutually exclusive. A value can be specified for either, but not both. |
RetentionDays |
Determines the number of days, in DDD format, such as 002. Valid Values: 001–999 |
RetentionGenerations |
Determines the number of generations, in ### format, such as 051. Valid Values: 000–999 |
Archiving |
Determines how long Control-M Workload Archiving retains the job output. |
JobRunsToRetainData |
Determines the number of times the job run data is retained in the job output. |
DaysToRetainData |
Determines the number of days the job run data is retained in the job output. |
ArchiveSysData |
Determines whether to archive the job SYSDATA. Valid Values:
|
Scheduling |
Defines the scheduling parameters when or how often the job is scheduled for submission. |
MinimumNumberOfTracks |
Determines the minimum number of free partitioned data set tracks required by the library specified for the PartitionDataSet parameter. |
PartitionDataSet |
Defines the name of a partitioned data set to check for free space. If PartitionDataSet has fewer than the minimum number of required free tracks specified in the MinimumNumberOfTracks parameter, the job executes. |
RerunLimit |
Determines the maximum number of reruns that can be performed for the job. When a z/OS job reruns, the job status is set to Not OK, even if it was previously specified as OK. |
RerunMember |
Defines the name of the JCL member to use when the job automatically reruns. Rules:
|
Units |
Determines the unit of measurement to wait between reruns. Valid Values:
|
Every |
Determines the number of Units to wait between reruns. |
MustEnd |
Determines the time of day and days offset when the folder must finish executing. |
Hours |
Determines the hour of the day, in HH format, such as 20. Valid Values: 00–23 |
Minutes |
Determines the minute of the hour of the day, in MM format, such as 18. Format: MM Valid Values: 00–59 |
Days |
Determines the number of days, in DDD format, such as 002. Format: DDD Valid Values: 000–120 |
LockType |
Determines whether a lock resource is shared or exclusive. For more information, see Resources. |
IfFail |
Determines what happens to the lock or pool resource if the job fails to use the resource. For more information, see Resources. Valid Values:
|
IfOk |
Determines what happens to a pool resource if the job successfully uses the resource. For more information, see Resources. Valid Values:
|
Quantity |
Determines the number of lock or pool resources to allocate to the job. For more information, see Resources. |
StepRange |
Determines the job steps to execute during restart of a job. Parameters:
Rules:
|
IfCollection:zOS - Ifs |
Defines the following unique If objects that apply to a z/OS job:
|
IfCollection:zOS - Actions |
Defines the following unique Action objects that apply to a z/OS job:
|
Job:zOS:InStreamJCL
The following example shows how to define a Job:zOS:InStreamJCL job:
"ZF_ROBOT" :
{
"Type" : "SimpleFolder",
"ControlmServer" : "R2MTROLM",
"FolderLibrary" : "CTMP.V900.SCHEDULE",
"OrderMethod" : "Manual",
"Z_R1" :
{
"Type" : "Job:zOS:InStreamJCL",
"JCL" : "//ROASMCL JOB ,ASM,CLASS=A,REGION=0M\\n//JCLLIB ORDER=IOAP.V900.PROCLIB\\n//INCLUDE MEMBER=IOASET\\n//S1 EXEC IOATEST,PARM='TERM=C0000'\\n//S2 EXEC IOATEST,PARM='TERM=C0000'",
"CreatedBy" : "emuser",
"RunAs" : "emuser",
"When" :
{
"WeekDays" : [ "NONE" ],
"MonthDays" : [ "ALL" ],
"DaysRelation" : "OR"
},
"Archiving" :
{
"ArchiveSysData" : true
}
}
}
For descriptions of parameters, see the list of parameters available for Job:zOS:Member (except for MemberLibrary, which is not relevant here).
The following additional parameter is required for a Job:zOS:InStreamJCL job.
Parameter |
Description |
---|---|
JCL |
Defines a script as it would be specified in a terminal for the specific computer and is part of the job definition. Each line begins with // and ends with \\n. |