View previous topic :: View next topic
|
Author |
Message |
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
From Your textual description there is no relation whatsoever between job A and the others |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Enrico,
Sorry. I think I missed this Job A part triggering.
Job B will have 2 predecessors - Job A and Dataset.
Job B satisfies Job A trigger part, however Job B is still in PREDWAIT status, since Dataset condition didn't get satsified eventhough Dataset got created.
Thanks
Vinu |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Hi All,
I am thinking of some script issue around USERREQ. Tried changing the script couple of ways (like adding ANYCLOSE after DSTRIG <DSN NAME>, adding RENAME) but that didn't work out.
Thanks
Vinu |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Thanks Peter,
Earlier I have tried with this PRIMED and it didn't work out.
It was told to keep EVENT, however I am getting syntax error on EVENT keywork itself. I think Dataset trigger is EVENT based and not JOB based. I am lacking the proper syntax and gaps in understanding is there.
Current status is I need to force complete USERREQ file and then only remaining jobs - JOB B and JOB C will run.
Thanks
Vinu |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Hi All,
Can anyone please let me know the meaning of USERREQ line and BIGFILE. Absolutely no clue about that. The person who gave this code to me also dont have any idea about it..
Thanks
Vinu |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
What does the manual say that you do not understand? |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Hi Nic,
To be frank, I have googled and got one CA Workstation manual, but it didn't talk about the words that I have mentioned.
If somebody can help with the coding syntax of Mainframe event or provide some document links that explains it, that will be great.
Thanks
Vinu |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Why are you Googling at all? If your site has a license for the product, CA gives you access to the manuals. They may be hardcopy at your site, or softcopy on your intranet, or you may have to download them from the CA web site (which may require to register with your CA site id). Furthermore, you should be able to talk to CA support about your issue -- you are much more likely to get a correct and complete answer from CA than from this or any forum. |
|
Back to top |
|
|
vinu78
Active User
Joined: 02 Oct 2008 Posts: 179 Location: India
|
|
|
|
Ok thanks Robert for the info. Will try getting info from CA site. |
|
Back to top |
|
|
|