> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:ibm-m...@bama.ua.edu] On Behalf Of Jim McAlpine > Sent: Thursday, March 18, 2010 10:22 AM > To: IBM-MAIN@bama.ua.edu > Subject: Notify a user if a job ends with non zero RC > > There are probably a number of ways to achieve the above but > I'm looking for > the best way. Basically if any step in a job ends with a non > zero return > code, I want to notify a particular user who will not be the > submitting > user. I've done this in the past but I'm looking for the > latest tricks to > achieve this. > > Jim McAlpine
Well, I might look at JES2 exit 28. That is end-of-job exit. The JCT for the job is available. The max return code for the job is available in JCTMAXRC if bit JCT4RCST is set in JCTFLAG4. JCTLSTAB contains the abend code, if the job abended, if that same bit is set, along with JCT4STAB. I.e. if JCT4STAB is set, then the job abended and the code is in JCTLSTAB. If it is not set, then the max RC is in JCTMAXRC. The use whatever method you like to inform the user (I'd likely use MSGCRE to issue a SEND command). -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html