× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I create copybooks for system APIs, QMHSNDPM was one of the first. I use 4 copybooks,
DQMHSNDPM( http://code.midrange.com/5a6909a849.html ),
ZQMHSNDPM( http://code.midrange.com/04948d58f9.html),
CQMHSNDPM( http://code.midrange.com/fc16023b67.html),
LQMHSNDPM ( http://code.midrange.com/a92037c7bb.html)

D...- Definitions
Z...- Initialization (*inZsr)
C...- Calculations/Call API
L...- Clean up (*inLr)

This way the sent message has the correct program/procedure name(s) and the line number is only a few lines below the actual code which produced the message.

Duane Christen

P.S. These are ancient, they were originally developed in the mid 90's for RPG III. They are in thousands of programs so I have not updated them to better fit my current naming/coding style. But I would love to.


--


Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx

Visit PAETEC.COM


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Thursday, April 29, 2010 9:06 AM
To: 'RPG programming on the IBM i / System i'
Subject: RE: Message from RPG

I have posted (http://code.midrange.com/b02a1eddae.html) a procedure that I use in my standard error handling routine. This routine arguably solves the issue that messages sent from service programs do not give indication of the program that caused the failure. I have my own issues with such a requirement, especially when the message will be sent from a separate procedure anyway. As soon as you enter another procedure, you are opening yourself up to the possibility that that procedure will someday be moved to a service program. Besides, it is a dubious benefit to know what Program failed when you still have no clue what procedure failed within that program.



As a middle ground, my showCallStack() procedure will return, complete with line numbers, information about the call stack at the time the procedure is called. So, I have in my standard error handling routine a line that says:

failPoint = showCallStack(0: 2: *Off), and the returned information is sent to the joblog as a diagnostic message. No, you won't get the from/to program and line number in your F9=AdditionalInformation display, but you will have that stuff in the job log along with detail than i5OS doesn't provide.



There's also a tester program there to demonstrate sort of how it works.
But (I noticed after posting) the LUVBNDDIR stuff will have to be removed and/or replaced with your own. (Bind it your way, in other words.)



I hope some can make use of the routine.



Dennis E. Lovelady
AIM/Skype: delovelady MSN: fastcounter@xxxxxxxxxxxx
<http://www.linkedin.com/in/dennislovelady>
www.linkedin.com/in/dennislovelady --
"That was Benes' fifth strikeout of the day. He came in with 94, so now he has 104 strikeouts for the year."
- sportscaster Ralph Kiner



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.