Author: vinu78
Subject: CA Workload Automation event code help
Posted: Wed Mar 01, 2017 10:05 am (GMT 5.5)
Hi All,
I am using CA Workload Automation tool to automate 3 Mainframe Batch jobs - Job A will run on Manual trigger. However Job B should run once the dataset gets created by 3rd party system after sometime. Once that is created, Job B runs and then Job B triggers Job C. I have created EVENT in Mainframe and called this in Trigger event in CA WA tool. So we have manually triggered Job A in CA WA tool and it ran fine. Then I have manually created Dataset (as part of testing purpose), however Job B is not running. Job B is in PREDWAIT state. The Event (named as BATCH1) that is written is as follows:
If I force complete USERREQ file, then Job B starts running and then Job C. However my requirement is to automatically have Job B run, if the dataset gets created. I am thinking that some thing more needs to be added in the Event code.
Please help.
Thanks
Vinu
Subject: CA Workload Automation event code help
Posted: Wed Mar 01, 2017 10:05 am (GMT 5.5)
Hi All,
I am using CA Workload Automation tool to automate 3 Mainframe Batch jobs - Job A will run on Manual trigger. However Job B should run once the dataset gets created by 3rd party system after sometime. Once that is created, Job B runs and then Job B triggers Job C. I have created EVENT in Mainframe and called this in Trigger event in CA WA tool. So we have manually triggered Job A in CA WA tool and it ran fine. Then I have manually created Dataset (as part of testing purpose), however Job B is not running. Job B is in PREDWAIT state. The Event (named as BATCH1) that is written is as follows:
Code: |
APPL BATCH1 SCH020 = 'YESTERDAY' IF %USER2 = 020 THEN SCH020 = 'TODAY' OPTIONS RESTARTSTEP JCLLIB '<PDS where the JOB A, B and C resides>' INVOKE '<pds>' OPTIONS RESTARTSTEP JOB A TAG '040' RESOURCE ADD (1,THR_MAINFRAME) RESOURCE ADD (1,RESBARL) RUN %SCH020 RELEASE ADD(JOB B) JOB USERREQ.JOB B TASK DOCMEM(JOB B) RUN REF JOB B RELEASE ADD (JOB B) ENDJOB DSTRIG BIGFILE DSNAME <dataset that triggers> RELEASE ADD(JOB B) ENDJOB JOB B TAG '040 RESOURCE ADD (1,THR_MAINFRAME) RESOURCE ADD (1,RESBARL) RUN %SCH020 RELEASE ADD(JOB C) JOB C TAG '040 RESOURCE ADD (1,THR_MAINFRAME) RESOURCE ADD (1,RESBARL) RUN %SCH020 |
If I force complete USERREQ file, then Job B starts running and then Job C. However my requirement is to automatically have Job B run, if the dataset gets created. I am thinking that some thing more needs to be added in the Event code.
Please help.
Thanks
Vinu