Chapter 24: z/OS Jobs
z/OS Jobs
You can use z/OS jobs to run mainframe workload.
Note: To run these jobs, your system requires CA WA Agent for z/OS.
CA WA Agent for z/OS submits and tracks the z/OS jobs. You can define the following
three types of z/OS jobs:
z/OS Regular
Schedules z/OS jobs.
z/OS Manual
Creates dependencies on z/OS jobs that are submitted outside of the scheduling
manager.
z/OS Data Set Trigger
Creates dependencies on data set activities. You can customize trigger conditions to
define the conditions in which the z/OS Data Set Trigger job completes. You can
specify trigger conditions for the following data set activities:
■ When a data set is created or updated
■ When a specific job, group of jobs, or user ID creates a data set
■ When an explicit data set notification is received (used when the data set
activity does not generate an SMF record)
■ When an FTP file is sent or received successfully
Note: Each data set must have its own individual z/OS Data Set Trigger job. To
create dependencies on multiple data sets, you must create multiple z/OS Data Set
Trigger jobs.
Define a z/OS Data Set Trigger Job
You can define a z/OS Data Set Trigger job to create dependencies on data set activities.
Note: To run these jobs, your system requires CA WA Agent for z/OS.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: ZOSDST
Specifies that the job type is z/OS Data Set Trigger.
machine
Specifies the name of the machine on which the job runs.
zos_dataset
Specifies the Job Control Language (JCL) library name. The JCL library or JCLLIB
contains the JCL for the z/OS job. The JCLLIB is a z/OS data set name.
2. (Optional) Specify optional z/OS Data Set Trigger attributes:
■ zos_dsn_renamed
■ zos_dsn_updated
■ zos_explicit_dsn
■ zos_ftp_direction
■ zos_ftp_host
■ zos_ftp_userid
■ zos_trigger_by
■ zos_trigger_on
3. (Optional) Specify common attributes that apply to all job types.
The z/OS Data Set Trigger job is defined.
Define a z/OS Data Set Trigger Job
Notes:
■ Attributes that have a default value automatically apply to the job definitions;
therefore, they are optional. For example, jobs with no specified job type are
defined as command jobs by default. Other optional attributes specify information
that is not required but affects how or when a job runs, such as attributes that
specify scheduling conditions.
■ Some optional attributes are common to all job types but others apply to certain
jobs types only. Optional attributes that apply to all job types are known as
common optional attributes. For more information about common optional
attributes and the values that you can specify for them (including their default
values when applicable), see the Reference Guide.
■ For information about required attributes and job type specific optional attributes,
see the procedure topics that provide instructions for defining jobs.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Example: Define a z/OS Data Set Trigger Job
This example triggers when the data set PROD.CICS.FILE1602 is closed (created or
updated).
insert_job: PROD.NIGHTLY
job_type: ZOSDST
machine: ZOS1
zos_dataset: PROD.CICS.FILE1602
owner: zosuser
More information:
Insert a Job Definition (see page 88)
Define a z/OS Data Set Trigger Job
478 User Guide
Attributes with Default Values
Attributes that have a default value automatically apply to the job definition. Therefore,
you do not have to specify those attributes in the definition. Your agent administrator
can define some default values on the agent in the agentparm.txt file.
If you specify the attribute in a job definition, it overrides the default.
The following z/OS Data Set Trigger job attributes have default values:
zos_explicit_dsn
Specifies whether the job monitors for an explicit data set.
Default: FALSE (The job does not monitor for an explicit data set.)
zos_dsn_renamed
Specifies whether the job monitors when a data set is renamed.
Default: N (The job does not monitor when the data set is renamed.)
zos_dsn_updated
Specifies whether the job monitors for updates to a data set.
Default: N (The job does not monitor for updates to the data set.)
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.
Define a z/OS Data Set Trigger Job
Monitor Data Set Activity by a User or Job
You can define a z/OS Data Set Trigger job to monitor when a specific job, group of jobs,
or user ID creates a data set. When the specified condition is met, the job completes.
Follow these steps:
1. Define a z/OS Data Set Trigger job (see page 476).
2. Add the following attributes to the job definition:
zos_trigger_type
Specifies whether the job monitors data set activity by a job or a user ID.
zos_trigger_by
Specifies the name of the job or user who performs the data set activity that
triggers the job.
3. Run the job.
The job monitors for data set activity by the specified user or job.
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.
Example: Restrict the Trigger to Specific Data Sets Created by a Particular User
Suppose that you want the z/OS Data Set Trigger job PROD.PAY_DATA to release its
successors when the user CYB1 creates generation data set USER1.PAYROLL
(USER1.PAYROLL.G-). The agent ZOS1 monitors the data set under user CYBDL01.
insert_job: PROD.PAY_DATA
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: USER1.PAYROLL.G-
zos_trigger_type: zos_user_id
zos_trigger_by: CYB1 Define a z/OS Data Set Trigger Job
480 User Guide
Example: Restrict the Trigger to Specific Data Sets Created by a Particular Job
Suppose that you want a z/OS Data Set Trigger job named PROD.PAY_DATA to release
its successors when job ABC creates generation data set USER1.PAYROLL
(USER1.PAYROLL.G-).The agent ZOS1 monitors the data set under user CYBDL01.
insert_job: PROD.PAY_DATA
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: USER1.PAYROLL.G-
zos_trigger_type: zos_job_name
zos_trigger_by: ABC
Monitor an FTP Transfer on z/OS
You can define a z/OS Data Set Trigger job to monitor when an FTP file is sent or
received successfully. When the specified condition is met, the job completes.
Follow these steps:
1. Define a z/OS Data Set Trigger job (see page 476).
2. Add the zos_explicit_dsn attribute to the job definition using the following syntax:
zos_explicit_dsn: FALSE
3. Add the following attributes:
zos_ftp_direction
Specifies whether the job monitors for an FTP transfer to a remote computer or
from a remote computer.
zos_ftp_host
Specifies the name of the remote computer involved in the FTP transfer. The
data is transferred to or from the local mainframe computer.
zos_ftp_userid
Specifies the FTP user ID used to connect to a remote computer.
4. Run the job.
The job monitors for the specified FTP transfer.
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.
Define a z/OS Data Set Trigger Job
Example: Monitor for a Data Set Sent to a Remote FTP partner
Suppose that you want the z/OS Data Set Trigger job CYBER.XFER to release its
successors when data set CYBER.XFER.001 is successfully sent from the local mainframe
partner to a remote FTP partner. The agent ZOS1 monitors the FTP transfer under user
CYBDL01.
insert_job: CYBER.XFER
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: CYBER.XFER.001
zos_ftp_direction: SEND
Example: Restrict Triggering to a Specific Host
Suppose that you want the z/OS Data Set Trigger job CYBER.XFER to release its
successors when a remote FTP partner with IP address 172.16.0.0 successfully transfers
a file creating the data set CYBER.XFER.001. The agent ZOS1 monitors the FTP transfer
under user CYBDL01.
insert_job: CYBER.XFER
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: CYBER.XFER.001
zos_ftp_direction: RECEIVE
zos_ftp_host: 172.16.0.0
zos_ftp_userid: CYB1 Define a z/OS Data Set Trigger Job
482 User Guide
Example: Restrict Triggering to a Specific Login ID
Suppose that you want the z/OS Data Set Trigger job CYBER.XFER to release its
successors when a remote FTP partner successfully transfers a file creating the data set
CYBER.XFER.001, assuming that the remote FTP partner logged on to the FTP server with
the CYBER005 user ID. The agent ZOS1 monitors the FTP transfer under user CYBDL01.
insert_job: CYBER.XFER
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: CYBER.XFER.001
zos_ftp_direction: RECEIVE
zos_ftp_host: 172.16.0.0
zos_ftp_userid: CYBER005
Example: Restrict the Trigger to an FTP Transfer from a Specific User ID
This example releases the job's successors when a remote FTP partner successfully
transfers a file creating the data set CYBER.XFER.001, assuming that the user ID prefix of
the local FTP partner is CYB (CYB-). The agent ZOS1 monitors the FTP transfer under user
CYBDL01.
insert_job: CYBER.XFER
job_type: ZOSDST
machine: ZOS1
owner: CYBDL01
zos_dataset: CYBER.XFER.001
zos_trigger_type: zos_user_id
zos_trigger_by: CYB-
zos_ftp_direction: RECEIVE
zos_ftp_userid: CYB- Define a z/OS Manual Job
Define a z/OS Manual Job
You can define a z/OS Manual job to create dependencies on z/OS jobs that are
submitted outside the scheduling manager, such as a job that is submitted manually by
a user.
Note: To run these jobs, your system requires CA WA Agent for z/OS.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: ZOSM
Specifies that the job type is z/OS Manual.
machine
Specifies the name of the machine on which the job runs.
zos_jobname
Specifies the name of the z/OS job that is submitted outside of CA Workload
Automation AE.
2. (Optional) Specify optional z/OS Manual attributes:
■ auth_string
■ job_terminator
■ search_bw
3. (Optional) Specify common attributes that apply to all job types.
The z/OS Manual job is defined.
Notes:
■ The job_terminator attribute is set to N by default. If you do not specify this
attribute in your job definition, the job does not terminate if its containing box
completes with a FAILURE or TERMINATED status. You can override this default
setting by specifying the job_terminator attribute in your job definition.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Define a z/OS Regular Job
484 User Guide
Example: Post a z/OS Manual Job as Complete Based on the User ID
This example posts a z/OS Manual job as complete when the manually-submitted job
ABC runs under user CYBER. The ZOS1 agent monitors job ABC.
insert_job: ABC_job
job_type: ZOSM
machine: ZOS1
zos_jobname: ABC
owner: zosuser
auth_string: CYBER
More information:
Insert a Job Definition (see page 88)
Define a z/OS Regular Job
You can define a z/OS Regular job to schedule a z/OS job.
Note: To run these jobs, your system requires CA WA Agent for z/OS.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: ZOS
Specifies that the job type is z/OS Regular.
machine
Specifies the name of the machine on which the job runs.
jcl_library
Specifies the Job Control Language (JCL) library name. The JCL library or JCLLIB
contains the JCL for the z/OS job.
2. Specify the following attribute if jcl_library is a partitioned data set (PDS):
jcl_member
Specifies the JCL member that contains the JCL for your job. If the jcl_library
attribute specifies a fully qualified data set name, the jcl_member attribute
specifies the zOS job name.
Define a z/OS Regular Job
3. (Optional) Specify optional z/OS Regular attributes:
■ condition_code
■ copy_jcl
■ envvars
■ job_terminator
4. (Optional) Specify common attributes that apply to all job types.
The z/OS Regular job is defined.
Notes:
■ The job_terminator attribute is set to N by default. If you do not specify this
attribute in your job definition, the job does not terminate if its containing box
completes with a FAILURE or TERMINATED status. You can override this default
setting by specifying the job_terminator attribute in your job definition.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Example: Store a Working Copy of the JCL that You Submitted
Suppose that the agent ZOS1 submits the JCL in member CYBDL01A in the
CYBDL01.JCLLIB library. If the job fails, you can modify a working copy of the JCL in the
CYBDL01.COPY.JCLLIB data set, and resubmit the job without affecting the JCL source.
insert_job: CYBDL01A
job_type: ZOS
machine: ZOS1
jcl_library: CYBDL01.JCLLIB
jcl_member: CYBDL01A
owner: CYBDL01
copy_jcl: CYBDL01.COPY.JCLLIB
No comments:
Post a Comment
Note: only a member of this blog may post a comment.