× 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: Bob Crothers <bob@xxxxxxxxxxxxxx>
  • Date: Fri, 9 Jul 1999 12:31:03 -0000
  • Organization: Cornerstone Communications, LLC

Tim,

I was not the original poster...Their solution might be much more 
elegant.

But if somebody needs a quick & dirty method, this one works.  It 
probably shouldn't be used for each screen transition somebody goes 
thru....but if it is just checking for the occasional switch, it works 
great.  For something that happens a lot, the driver approach would 
probably be much faster.

Bob

-----Original Message-----
From:   Tim McCarthy [SMTP:TimM@softwarejungle.com]
Sent:   Friday, July 09, 1999 11:04 AM
To:     'MIDRANGE-L@midrange.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
>
>
>
> -----Original Message-----
> From: zylka.marc@westpoint-stevens.com
> [SMTP:zylka.marc@westpoint-stevens.com]
> Sent: Friday, July 09, 1999 7:36 AM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re:Recursive Calls
>
>
>
> Tim, I'd love to have a copy of that command.  That should be the
> easiest way to
> limit
> someone from calling program B again.
>
> Thanks,
> Marc Zylka, 228-5267
>
>
> ____________________Reply Separator____________________
> Subject:    RE: RE: Recursive Calls
> Author: <MIDRANGE-L@midrange.com>
> Date:       7/8/99 6:08 PM
>
> Hey, I have a little command that can check to see whether a given
> program is in the current jobs stack. I used to use it to prevent
> recursion for a menuing system I had once. Anyone want a copy?
> Tim
>
>
>
>
> +---
> | 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
> +---
>
> +---
> | 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
> +---
+---
| 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
+---

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