Error Handling In Cobol/400
Contents |
the COBOL program. From: "Jack Welch"
Error Handling Java
Error Handling C++
both occurances. is it Batch or Interactive? Did you look in history logs? DSPLOG to *PRINT and scan spool for relative info. Maybe set the job to http://www.ibm.com/support/knowledgecenter/ssw_i5_54/apis/hll2.htm end with a Job Log. CHGJOB, CHGJOBD, signoff *list --Jack _________________________________________________ Part of my problem is that I'm not sure which program is getting the error. There is a series of programs that get called and the messages don't indicate which program is in error. I had compiled a few of the programs into QTEMP, but http://archive.midrange.com/cobol400-l/200606/msg00012.html the only one that looked even remotely suspicious at the stated line number is: SET WS-WKLMT TO 2. However, I can't figure out how that would cause an I/O error. The programs are run multiple times every day for the last 20 years. Maybe I just need to wait for the next occurrence and make sure that the message doesn't get answered before I can do a dump and look at the invocation stack. Thanks, Penny "Jack Welch"
check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. sponsored links http://www.code400.com/forum/forum/iseries-programming-languages/cobol-aa/10619-error-handling-in-cblle Collapse Announcement Collapse No announcement yet. Error Handling in CBLLE Collapse X Collapse Posts Latest Activity http://itknowledgeexchange.techtarget.com/itanswers/trap-error-in-cobol400/ Search Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts FaStOnE Sr. Product Specialist Join Date: Nov 2005 Posts: 2614 #1 Error Handling in CBLLE April 14th, 2011, 03:54 PM We have some Proof of Concept things going on here and I need some help error handling from the BEST source on the WWW... you guys!! I'm going over DataQueues with the Development staff here (Remember, they're COBOL'ers). They are convinced they can't trap Error Messages from within COBOL. I know that you can use the "QlnSetCobolErrorHandler" and the QUS-EC etc... but, I really need a working example of how this is used. What's the chance someone here might have a tidbit I can load/compile and prove they can do this? Thanks in Advance!! -Rick _____________________________ Need a Managed File handling in cobol Transfer Solution -OR- iSeries Encryption? GoAnywhere and Crypto Complete by Linoma Software Tags: None MichaelCatalani Lord of the Dance Join Date: Aug 2008 Posts: 1723 #2 April 14th, 2011, 05:23 PM Re: Error Handling in CBLLE What kind of errors are they attempting to trap? If its an error on the api call itself, they can be trapped by passing the API Error data structure to the api call for dataqueues. I dont have an example for cobol, but here's an example of the error data structure in RPG. Code: /if defined(ApiError) /eof /endif /define ApiError d ApiError DS Inz Qualified d Bytes 10i 0 Inz( %Size( ApiError )) d BytesAvailable... d 10i 0 Inz d ErrorID 7a Inz d Reserved 1a Inz( x'00' ) d MessageData 128a Inz You would trap for the error in cobol in the same manner, by testing the value of "BytesAvailable" to see if its greater than 0. If it is, then the value of ErrorID will contain the error itself. (They can create this same data structure in cobol. And this data structuer is used for many of the api's, not just data queues. ) So they can specify this error api data structure on their api calls, and trap for the errors that way. Also, this error data structure should be "reset" to its initial state before each api call. In RPG, we do this with the reset opcode ie: reset ApiError; Last edited by MichaelCatalani; April 14th, 2011
? Ask a question, help others, and get answers from the community Discussions Start a thread and discuss today's topics with top experts Blogs Read the latest tech blogs written by experienced community members Trap error in COBOL/400 AS400 - Ask the Expert 485 pts. Tags: Thanks! We'll email youwhen relevant content isadded and updated. Following Follow AS/400 Thanks! We'll email youwhen relevant content isadded and updated. Following Follow COBOL/400 Thanks! We'll email youwhen relevant content isadded and updated. Following Follow Error handling I want to know how to trap error in cobol400 Asked: December 9, 200810:10 PM Last updated: August 23, 20148:26 AM Related Questions Trap decimal data error in COBOL/400 DB2/400 Error Trapping Retriveing massage from submited job in CLP How do you initiate a direct web service call from the AS/400? Using LIKE in AS/400 Cobol Answer Wiki Last updated: December 10, 20086:37 PM GMT Rlsantucijr445 pts. History Contributors Ordered by most recent Rlsantucijr445 pts. Thanks. We'll let you know when a new response is added. What type of error? I/O? Arithmetic? What type of error? I/O? Arithmetic? Please enter an answer. Send me notifications when members answer or reply to this question. Register Hereor login if you are already a member E-mail User Name Password Forgot Password? By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy Improve This Answer Improve This Answer Processing your response... Discuss This Question: 2  Replies There was an error processing your information. Please try again later. Thanks. We'll let you know when a new response is added. Please enter a reply. Send me notifications when members answer or reply to this question. Register Hereor login if you are already