|
Thanks Simon, I am unfamilar with UNIX and C. Tried #3,it worked. Tried #4(Tom's assistance), it worked after using QUSRJOBI to retreive the "ACTIVE JOB STATUS" value. Thanks for your suggestions. Michael -----Original Message----- From: Simon Coulter [mailto:shc@flybynight.com.au] Sent: December 27, 2001 09:18 PM To: midrange-l@midrange.com Subject: Re: Condition Handlers and CL Hello Michael, You wrote: >Could you please tell me how the program that is called by the api knows >that the job has "abend'ed" if the user has used the ENDJOB command? The only ways I know to monitor for ENDJOB/ENDSBS/ENDSYS are: 1/ Signal handler - see the signal handler API section of the Unix API reference manual. Specifically, the sigaction() function to monitor for the SIGTERM signal. 2/ Invocation exit programs - see the C runtime and MI library reference manuals. atexit() is used to specify a procedure that will be invoked during normal end. atiexit() is used specify a program that will be invoked during abnormal end. 3/ ILE APIs - see the Activation Group and Control Flow APIs in the ILE CEE API manual. Specifically, the CEERTX and CEE4RAGE APIs. The handler registered with CEERTX is invoked for ENDJOB *IMMED, and is invoked after the controlled delay time elapses for ENDJOB *CNTRLD. It also gets invoked for any exit except a return. 4/ Scope messages - see the message handler API manual. Specifically, the QMHSNDSM API (as mentioned in other threads). If you send the scope message to *EXT you can monitor for ENDJOB etc. Since ending a job does not raise an exception in that job you cannot use the condition handler APIs. Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ -------------------------------------------------------------------- _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.