Hi Willie
Your requirements are something of a conflict. If you want to save your alerts to a z/OS data set, you need DISP=MOD on the data set, otherwise they would be overwritten at the end of the (hourly) reporting cycle. DISP=MOD means, no other address space can read the data set. The only time you could retrieve the alert messages, if any, would be when C2POLICE cycles, at the end of the environment interval. In fact, you could read from the data set in the environment processing stage (the Stage 1 phase), copy the alerts from the DISP=MOD data set to some other place.
Alternatively, you could write to a GDG generation with DISP=(NEW,CATLG) and ensure there is a CARLa ALLOC command that allocates a work file to a new generation (+1) of the same GDG. The old generation can be processed once C2POLICE starts writing to the new one.
In both cases, you would have to allocate the output data set to a DD name, say ALERTDS, and in the alert skeleton hand-build the NEWLIST command with a DD=ALERTDS, instead of the standard alert destinations.
You could also consider writing to a z/OS UNIX file, instead of the z/OS data sets. The fun thing about z/OS UNIX is that you can append to the file, while others can read the same file. Long ago (in a different galaxy...) I got C2POLICE to write into UNIX files, and used a Rexx to send the alerts from the file to a Splunk server. They needs TCP based syslog and all zSecure could offer was UDP, so.... got there using UNIX and Rexx. See here for the documentation and here for the alert skeleton, including the mechanism to execute an ALLOC at the beginning of each environment cycle.
Finally, if you only need to save the alerts in a data set on z/OS, there are 2 more options:
- use the Write to data set option in the alert definition, this writes the alert text to a SYSOUT data set.
- start SYSLOGD on z/OS UNIX, configure it to accept connections via the network. Add 127.0.0.1 as UDP Syslog destination for the alerts.
------------------------------
Rob van Hoboken
------------------------------