How about using "Message Watching"?
See the IBM commands for STRWCH, ENDWCH, and WKRWCH.
Also QSCSWCH and QSCEWCH APIs.
Bruce Vining presented at the TUG Meeting of Members and showed us a nice message watch exit program.
From: Kirk Goins <kirkgoins@xxxxxxxxx>
Date: Mon, 28 Jan 2013 15:05:46
Reply-To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Tracking Job Start and End Times with out coding each job
What are folks using these days to
#1 Track Job Start and End Times
#2 Job Completion Status
#3 Email when jobs hang or end abnormally?