Darren :
Please update your signature to show your environment settings. Responses to your Questions would then be more direct and appropriate.
Getting back to your issue, here is how we do it on a mainframe based EDA installation -
1> Have a SET command at the start of various routines to show the current location
-SET &CURSTP='A1';
2> Evaluate the &RECORDS field after appropriate TABLE FILE steps and determine if fex needs to continue processing or send out an alert email with a no-data message.
-IF &RECORDS EQ 0 GOTO LBL_EMLNODATA;
-SET &CURSTP='B2';
3> The email section does this...
-- Allocate a TSO file
-- -WRITE to this file, an entire JCL line-by-line. The main step here would be an emailing utility like IKJEFT01 or IEBGENER. The subject and body of this email contain a message and the &CURSTP value.
-- Once the JCL has been completely built, then DYNAM SUBMIT this dataset, to submit the job and email notify the recepient.
We use this techinque from many RPCs, so the emailing routine is actually a stand-alone fex and we -INCLUDE it whenever needed.
Like I said Darren, this is one way to do it if you are also on TSO.
Hope that helps to atleast give you an idea. And welcome to WebFOCUS.
Best regards,
Sandeep.
-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!