× 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.



> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Scott Klement
> Sent: Wednesday, July 27, 2005 3:18 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: dRE: No Subroutines (was Re: Debugging many 
> subprocedures)
> 
> 
> 
> 
> Okay, but in this case a subprocedure call would've been better if it 
> weren't for a flaw in that particular API that prevents you from 
> specifying where the message is coming from.
> 
> For example, the following code would've been better:
> 
>       if field1 = 'bad';
>          diag('Field 1 must not be bad');
>       endif;
> 
>       if field2 = 'bad';
>          diag('Field 2 must not be bad');
>       endif;
> 
> The only reason you can't use it is because there's no way to 
> tell that 
> API that diag() is a wrapper procedure and that the "real" 
> originator is 
> the proc before it.  So you use a subroutine purely because 
> it doesn't 
> create a different call stack level.
> 

I agree that it'd be nice if the message showed the procedure that called the 
QMHSNDPM API wrapper as the from procedure as opposed to the wrapper itself.

However, one technique I found to work around it is to have my QMHSNDPM wrapper 
send two messages, one to wherever I would normally send the message andone as 
a *DIAG message back to the caller of the wrapper.

This way in the job log, the "To Procedure" for the second message tells me 
what procedure called the wrapper.


Charles


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.