IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CA Workload Automation event code help


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Mar 01, 2017 10:05 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 01, 2017 12:02 pm
Reply with quote

From Your textual description there is no relation whatsoever between job A and the others
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Mar 01, 2017 12:07 pm
Reply with quote

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
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Mar 01, 2017 12:34 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Mar 01, 2017 1:30 pm
Reply with quote

Maybe this could help :

communities.ca.com/thread/101927774
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Mar 01, 2017 1:44 pm
Reply with quote

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
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Wed Mar 01, 2017 5:26 pm
Reply with quote

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..icon_sad.gif

Thanks
Vinu
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Mar 01, 2017 7:12 pm
Reply with quote

What does the manual say that you do not understand?
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Thu Mar 02, 2017 7:21 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 02, 2017 9:13 am
Reply with quote

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
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Thu Mar 02, 2017 9:47 am
Reply with quote

Ok thanks Robert for the info. Will try getting info from CA site.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts DB2 Event passed to the Application P... DB2 1
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top