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


  • Subject: RE: Recursive Calls--what I use
  • From: "Ken Sims at SWS Nevada" <ken.sws@xxxxxxxxx>
  • Date: Fri, 9 Jul 1999 12:01:28 -0700

Hi Tim -

It would be easy to make the program more sophisticated
so that it would:
1. If the SNDPGMMSG is successful, remove from the
   program's stack the message that was sent, and
2. If the SNDPGMMSG is not successful, remove the error
   message(s) returned.

Ken

>Date: Fri, 9 Jul 1999 12:03:34 -0400
>From: Tim McCarthy <TimM@softwarejungle.com>
>Subject: RE: Recursive Calls--what I use
>
>This will work but handling exceptions adds overhead - a
consideration
>if this is to be widely implemented - plus you get a lot of extra
&*&%
>in your job log. It also doesn't cater for situations where the
called
>program is library qualified (not a big deal I admit). I'll take Carl
up
>on his offer to post it on his BBS.
>
>> -----Original Message-----
>> From: Bob Crothers [SMTP:bob@cstoneindy.com]
>> Sent: Friday, July 09, 1999 2:10 AM
>> To: 'MIDRANGE-L@midrange.com'
>> Subject: RE: Recursive Calls--what I use
>>
>> Here is the little CL program I use to tell if a program is already
in
>>
>> the call stack.  Pass it a 1 character result field and the program
>> name.  If it is NOT in the call stack, the a blank will be
returned.
>>  If it IS in the stack, then 'A' is returned.
>>
>> Regards,
>> Bob Crothers
>>
>> PGM        PARM(&RESULT &PGMNAME)
>>
>>              DCL        VAR(&RESULT) TYPE(*CHAR) LEN(1)
>>              DCL        VAR(&PGMNAME) TYPE(*CHAR) LEN(10)
>>
>>              CHGVAR     VAR(&RESULT) VALUE(' ')
>>
>>              SNDPGMMSG  MSG(XXXX) TOPGMQ(*PRV (&PGMNAME))
>>              MONMSG     MSGID(CPF0000) EXEC(RETURN) /* Program is +
>>                           NOT in the call stack */
>>
>>              CHGVAR     VAR(&RESULT) VALUE('A') /* Program IS in
the +
>>
>>                           call stack */
>>
>>              ENDPGM
>>


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.