Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!lll-tis!ptsfa!ihnp4!cbosgd!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.wizards Subject: Re: Using argv to show process status Message-ID: <4260@ncoast.UUCP> Date: Tue, 25-Aug-87 19:15:46 EDT Article-I.D.: ncoast.4260 Posted: Tue Aug 25 19:15:46 1987 Date-Received: Fri, 28-Aug-87 01:39:40 EDT References: <1217@mhres.mh.nl> <6303@brl-smoke.ARPA> <1224@mhres.mh.nl> <7164@ism780c.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 38 As quoted from <7164@ism780c.UUCP> by mikep@ism780c.UUCP (Michael A. Petonic): +--------------- | In article <1224@mhres.mh.nl> jv@mh.nl (Johan Vromans) writes: | }When a user starts an application with "RUN menu", and menu chains to different | }application programs which all chain back to menu for the next choice, | }the "ps" will always show the "RUN menu" command. | | Well, how about making links to small C programs that would "RUN Menu" | (or a shell script) and then arv[0] would be the name of the link. +--------------- Won't work, as I understand his problem. An example of what he's saying: Many RM/COBOL programs have a menu module which chains to programs; those chain back to the menu. There is a single "chain manager" module which is entered and immediately CALL USING's the menu module with a linkage area to contain the name of the next program to run. It then enters a loop wherein every time a CALLed program returns, the program indicated in the linkage area is immediately CALL USING'ed with the same linkage area. The final module does a STOP RUN, which halts all CALL USING'ed programs and the chain manager. (MCS-3 does this; probably others do as well, since only two modules need ever be loaded at one time, and many of these programs are designed to work under CP/M-80 on a 32K machine.) The problem in this case is to make the linkage area's next-program-name field visible to "ps". (One way to do this is to use an RM/COBOL C hook and CALL USING it in the chain manager before "chaining" to the next module. But if this is what the poster is doing, s/he was wrong in at least one place: I can't find a BSD system which supports RM/COBOL. Whether this is a feature or a misfeature is debateable in a business environment.) As for a way to do it: about all I can think of is to run RM/COS. ;-) -- Brandon S. Allbery, moderator of comp.sources.misc {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery ARPA: necntc!ncoast!allbery@harvard.harvard.edu Fido: 157/502 MCI: BALLBERY <> ** Site "cwruecmp" has changed its name to "mandrill". Please re-address ** *** all mail to ncoast to pass through "mandrill" instead of "cwruecmp". ***