Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CA Workload Automation event code help

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 151
Location: India

PostPosted: Wed Mar 01, 2017 10:05 am    Post subject: CA Workload Automation event code help
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Mar 01, 2017 12:02 pm    Post subject: Reply to: CA Workload Automation event code help
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: 151
Location: India

PostPosted: Wed Mar 01, 2017 12:07 pm    Post subject:
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: 151
Location: India

PostPosted: Wed Mar 01, 2017 12:34 pm    Post subject:
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: 2435
Location: Netherlands, Amstelveen

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

Maybe this could help :

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

Active User


Joined: 02 Oct 2008
Posts: 151
Location: India

PostPosted: Wed Mar 01, 2017 1:44 pm    Post subject:
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: 151
Location: India

PostPosted: Wed Mar 01, 2017 5:26 pm    Post subject: Reply to: CA Workload Automation event code help
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: 1823
Location: UK

PostPosted: Wed Mar 01, 2017 7:12 pm    Post subject:
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: 151
Location: India

PostPosted: Thu Mar 02, 2017 7:21 am    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 02, 2017 9:13 am    Post subject:
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: 151
Location: India

PostPosted: Thu Mar 02, 2017 9:47 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us