CompuServe Messages

Finding Process Number?

    28-Nov-93 15:23:30
Fm: Terry Carroll 71550,133
To: John Toebes/SYSOP 70007,3467
<< Out of curiosity, WHY do you want to do this? There may be a different way to accomplish what you are looking for. >> Good question, John! I have a set of arexx programs that do lengthy text searches of a about a hundred files, using repeated applications of the ARP ASEARCH command, with various boolean search arguments. It's halfway to a database, and I probably should be converting it to one, but my last attempt at this (using SuperBase) wasn't fruitful; I'm now thinking of moving it to my Mac and using FoxBase. Anyway, some of these searches are quite lengthy, and I'd like to have a way of communicating with the rexx program to tell it to abort. HI doesn't cut it, because it will kill all rexx programs, not just the specific one I want to kill. What I envisioned was having the program put out its CLI number in its status messages, and I could write another program that would take this number as input and set some sort of global flag to request termination. The searching program could check this flag as it moves from file to file. I suppose I could have each rexx program come up with its own serial number, but the CLI number seemed a good start, because it's guaranteed to be unique, and use of this number is a standard method of ensuring uniqueness in an AmigaDos batch file. << As a quick check, I noted that on my system AREXX does not take up a process slot. > In case I'm not being clear (and I may be munging terminology as it would be used by an experienced Amiga programmer), I'm refering to the CLI number from which the rexx program is launched, as it is shown in the status command, e.g.: 7.TC-HardDisk:> STATUS . . . Process 4: Loaded as command: rx Terry Carroll, Santa Clara, CA Internet: tjc50@juts.ccc.amdahl.com