|
On Monday 03 March 2003 8:45 pm, Feador, Jerry wrote: > Hi All, > > Does anybody have a clue as to how I can prevent a recursive call > from a command? [snip] > Any ideas on how I can get the first CL(1) to end if the command is > already in effect (or running, or whatever)? Hi Jerry The way I've tackled this where I don't want a second instance of the program (whether it allows it or not) is to send a message to that program in the stack. If it fails, the program isn't there, so can be run, otherwise you don't call it. I wrapped it in a small CL program and just call it with the program name I want to check. Code is at http://www.dbg400.net/download/checkpgm.txt I swapped the message it sends from an in-house one to an IBM one that is more appropriate ;) Regards, Martin -- martin@xxxxxxxxxx AIM/Gaim: DBG400dotNet http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news / \
As an Amazon Associate we earn from qualifying purchases.
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.