Author |
Message
|
loudcfla |
Posted: Tue Oct 24, 2006 9:42 am Post subject: how to trigger to run a batch program |
|
|
Acolyte
Joined: 05 May 2002 Posts: 58
|
Hello, I want to set up a LOCAL QUEUE on Z/os, so that when 1000 message sent to it from UNIX have accumulated in this LOCAL QUEUE on the mainframe, I trigger a batch program to run and process the 1000 messages?
Can this be done? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 24, 2006 9:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What if only 999 messages show up? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
loudcfla |
Posted: Tue Oct 24, 2006 9:52 am Post subject: |
|
|
Acolyte
Joined: 05 May 2002 Posts: 58
|
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Oct 24, 2006 10:07 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
If you really, really want to do this use triggering on DEPTH. But as Jeff asks....What if only 999 messages are written and the application never gets triggered? |
|
Back to top |
|
 |
loudcfla |
Posted: Tue Oct 24, 2006 10:10 am Post subject: |
|
|
Acolyte
Joined: 05 May 2002 Posts: 58
|
Okay forget the DEPTH, can I run a batch program when a message arrives on a queue? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 24, 2006 10:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes.
You need a trigger monitor.
There's a Support Pack for this. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Oct 24, 2006 10:40 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
......oh and just to knock the final nail into the coffin for DEPTH...
Something would have to reset triggering back on for the queue after the trigger tripped.  |
|
Back to top |
|
 |
cicsprog |
Posted: Tue Oct 31, 2006 8:14 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
We have the SupportPac Jeff mentioned. I did have an app that did trigger a batch job based on DEPTH. I modifed the SupportPac (COBOL) to do a :
DISPLAY W00-EVENT-NAME-MSG124 UPON CONSOLE
when trigger conditions were met. The DISPLAY output landed on the MVS SYSLOG where ESP (in our case) or AO can submit/schedule the batch job. As far as the 999 messages go, periodically have your scheduling package run the batch job, say once a day, to process messages not meeting the trigger condition.
Trigger Monitor PGM is camped on this INITq que:
OUEUE LOCAL --> MQ??.QI.MVS.TRIGGER.EVENT
Process for triggering the correct batch job based on USERDATA:
Process --> DEFINE NOREPLACE
PROCESS('MVS.PR.SAMPLE.TRIGGER')
DESCR('PROCESS TO TRIGGER ESP EVENT')
APPLTYPE(MVS)
APPLICID('MVS SP320')
USERDATA('ESP=SAMPLE.MESSAGE.TO.SYSLOG')
ENVRDATA(' ')
Application destination queue with DEPTH set:
DEFINE NOREPLACE
QLOCAL('MQ??.QL.TPSUNP01.CTP.TO.ACCESS')
PROCESS('TSI.PR.CTP.TO.ACC.TRIGGER')
TRIGGER
INITQ('MQ??.QI.MVS.TRIGGER.EVENT')
TRIGDPTH(1000)
TRIGTYPE(DEPTH)
The Trigger Monitor program will retrieve USERDATA from the
process, once triggered, and process trigger message and send this data to MVS SYSLOG:
ESP=SAMPLE.MESSAGE.TO.SYSLOG
Trigger conditions are reset once queue reaches depth zero - but we all knew that  |
|
Back to top |
|
 |
gsrinidhi |
Posted: Tue Dec 19, 2006 11:06 am Post subject: |
|
|
Novice
Joined: 17 Jan 2006 Posts: 17 Location: mi
|
I wagely remember that one of the system did set-up something link this through the trigger monitor.
Am not sure what exactly they specified in trigger parameter of the queue.
But I remember that they used ca-7 sechular id and trigger the batch job based on mq depth.
You dont need to go through support pac and implement messages to appear on monitor to manually submit jobs.
Thanks |
|
Back to top |
|
 |
|