CA Workload Automation ESP Edition

Expand all | Collapse all

Setting up dependencies with CICS regions in ESP

Jump to Best Answer
  • 1.  Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 09:39 AM
    Hi,

    I have two questions;

    1.  I have not posted a question about ESP for many years, and I don't see an obvious way to search the discussions in the Broadcom website.  Can you provide a method?

    2.  I know it is possible to have ESP schedules have dependencies on CICS regions (started tasks).  I tried the following syntax, but the job just stayed in MANSUB status when the region was brought down, and started again:

    job CICSXXXX MANUAL
    run any
    endjob

    I'm guessing we need to tweak the tracking model, but would like to be sure before we make changes.


  • 2.  RE: Setting up dependencies with CICS regions in ESP
    Best Answer

    Posted 05-07-2020 10:37 AM
    Hi,
    1) When you go to the ESP community page there is a search( magnifying glass ) at the top. Try that to see if it gets you what you need. You may have to sign in.
    https://community.broadcom.com/mainframesoftware/communities/communityhomeblogs?CommunityKey=a63272f0-fb9f-44be-b0ff-9657f904076e
    After the search you may need to narrow the search by choosing the community..

    2) in the JTDT parm member you may need to add a line to track started tasks. See the example below.
    TRACKDEF STC NAME(CICS-) MODEL(MODEL1)
    In the manual it is on this page.
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/initialization-parameters/trackdef-specify-tracking-definitions.html

    Let me know if I "missed the boat"

    Don




  • 3.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 03:24 PM
    Thanks Don, I added a few TRACKDEFs, similar to your syntax above, loaded them, recycled one of our test CICS regions, and the schedule picked it up.

    I appreciate it.
    Darrell


  • 4.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 03:55 PM
    I do have a related follow-up question:

    Is there syntax to have a job run when the CICSXXXX manual job switches from MANSUB to EXECUTING?  I would like to run a set of jobs when I detect that the CICS region has come back up after a bounce.




  • 5.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 05:40 PM
    I tried a few things, but the basic requirement is, how do I release a job when another job starts executing, instead of when it completes.  I tried this, but the AJ command does not fire:

    job CICSXXXX manual
    run any
    espnomsg aj CICSXXXX.START complete appl(%ESPAPPL..%ESPAPGEN)
    rel add(CICSXXXX.RETRIG)
    endjob

    job CICSXXXX.START task
    run any
    rel add(JOBS I WANT TO RUN after CICSXXX starts executing)
    endjob

    job CICSXXXX.RETRIG link process
    run any
    espnomsg tr ESTMMI.DWTEST14
    endjob


  • 6.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 06:03 PM
    Hi,
    I think there are a few ways to make this happen.

    In the job add a NOTIFY statement similar to one of the ones below. In the job or globally at the top of the appl.
    NOTIFY JOBSTART ALERT(CICS)
    NOTIFY JOBSTART EVENT(PREFIX.EVENTNAME)
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/statements/notify-statement-notify-users-or-consoles.html


    OR
    Do a tracking model with JOBSTARTEVENT
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/commands/deftm-command-define-tracking-model.html

    I prefer the NOTIFY method since it is visible in the appl.

    Take a look.  We can walk through the details if you would like

    Don



  • 7.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-08-2020 11:05 AM
    Thanks Don,

    Was playing with this yesterday, and the snippet below works, but has a couple minor drawbacks, in that it can only monitor for 255 minutes (max for reexec) and can add an unnecessary delay up to a minute, since it is polling every minute:

    /* Completes when CICS region is up.
    job CICSXXXX.START task selfcompleting
    run any
    if not active('CICSXXXX') then reexec in(1)
    rel add(STARTJOB)
    endjob

    /* Jobs that run after region is up.
    job STARTJOB link process
    run any
    rel add(CICSUP.EMAIL)
    endjob

    This might be okay for my application, because I think we will need to send out alerts if the CICS region isn't up in 2 hours anyway.

    If I go with the notify method you provided, it looks like I will need at the very least, another event to be triggered by the notify, and it will need to issue an AJ command back to original schedule to complete a task to release the jobs that need to run when the CICS region comes up?


  • 8.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-08-2020 04:51 PM
    Don, I tried a notify pointing to an event (shown below), and it actually works great.  It instantaneously marks the start task complete when the region comes up, and it can wait indefinitely.  The trick was using %MN variables so I don't have to create an event for every CICS region.

    CICSBEG: espproc

    espnomsg aj %MNJOB..START complete appl(%MNAPPL..%MNAPPLGEN)

    Thanks!
    Darrell


  • 9.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-08-2020 04:57 PM
    Hi
    Great!.
    Just an additional thought.
    Many times it is important to relase jobs after CICS comes DOWN. It would be possible to leave CICS manual running and issue a complete to a dummy job. Then when the CICS ends it would release the successors.


    Don





  • 10.  RE: Setting up dependencies with CICS regions in ESP

    Posted 05-07-2020 11:35 AM

    We use the IP_MON Workload Objects to detect when an LPAR goes down and when the LPAR and region are available to automate the control of the job flow.

    /*     IP_MON WILL BE MARKED COMPLETE WHEN LPAR IS SHUT DOWN.       */

    IP_MON <Job Name>
       AGENT  <Agent Name>
       IPADDRESS '<IP Address>'
       STATUS STOP WAIT
       RUN ANYDAY
    ENDJOB

                                                                  

    /* IP_MON WILL BE MARKED COMPLETE WHEN THE LPAR AND REGION START    */

    IP_MON <Job Name>
       AGENT  <Agent Name>
       IPADDRESS '<IP Address>'
       STATUS RUNNING WAIT
       IPPORT <Region Port>
       RUN ANYDAY
    ENDJOB                                                               



    ------------------------------
    Senior Systems Analyst
    UPS
    ------------------------------