TSM macros and scripts are rather primitive, where doing much more than issuing commands and reacting to return codes is clumsy at best.
The TSM goal of site-issued messages usually attempts to deal with exceptional events. Rather than try to rig some kind of periodic script checking the database level, I would attempt to accomplish the task using provided facilities. The first one I would consider would be TSM server Event Logging, which is the best intended facility for the task. You could employ a FILETEXTEXIT writing to a FIFO which is read by a perl program, as a simple expedient, or write a C program for a USEREXIT type of implementation. More advanced is the SNMP facility, where you could perform SNMPTRAPs to convey event info to a central monitoring facility (often a commercial product), where such a monitoring instance usually provides a gamut of organizational information distributing, alerting, tracking, and historical reporting. Richard Sims http://people.bu.edu/rbs