home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!gatech!darwin.sura.net!sgiblab!troi!steve
- From: steve@dbaccess.com (Steve Suttles)
- Newsgroups: comp.os.vms
- Subject: Re: command procedure calling
- Message-ID: <160@mccoy.dbaccess.com>
- Date: 27 Jan 93 21:41:42 GMT
- References: <1k4p20INNjbq@gap.caltech.edu>
- Organization: Cross Access Corp., Santa Clara, CA
- Lines: 58
- X-Newsreader: Tin 1.1 PL4
-
- carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
- : In article <ERMIMWEI.20@er.ele.tue.nl?>, ERMIMWEI@er.ele.tue.nl (Wim Beckers) writes:
- : >When a command procedure is called by another command procedure their is
- : >always a return to the calling command procedure.
- : >Is there a possibility to NOT return to the calling procedure?
- :
- : Well, you *COULD* execute the command:
- : $ MCR DCL
- : (don't do this; it deletes your process, but it does *NOT* return to the
- : calling procedure :-).
-
- Eh?
-
- :
- : There's no documented way to exit from the entire stack of DCL procedures in a
- : single command. The best way to deal with this is, after every invocation of a
- : command procedure, have conditional code in the calling procedure. For
- : example:
- : $! LEVEL1.COM
- : $ @LEVEL2
- : $ IF ($STATUS .AND. 7) .NE. 1 THEN-
- : EXIT 'F$INTEGER(%X10000000 .OR. $STATUS)'
- : $ {additional commands}
- : and have the called procedure return a meaningful status when it exits.
-
- You could also $EXIT %X10000004 (a fatal status but don't print it)
- and unless the calling procedure did a SET NOON, he'll quit too.
-
- You could delete the calling command procedure's file (I've never done
- this intentionally, but I can tell you from experience, that command
- file will not continue to execute).
-
- You could log out.
-
- You could execute the STOP command (quits all command procedures. The
- job too, if you're in batch...but then, that makes sense).
-
- You could have the procedures "talk" to each other, with logicals or
- symbols or exit status values or the existence of a file or...
-
- You could reboot...this is usually a good way to stop a command file
- from executing...
-
- You could pull the plug. Tell them you need access to the
- documentation. Cite identical failures at campuses nationwide. Tell
- them it's not quite a virus...it's sorta like leprosy. The library
- needs first aid!
-
- Admittedly, some of these solutions are extreme. But then again, some
- problems are extreme. You didn't exactly say why you wanted to stop
- everything... (implied smile for Stan's sake)
-
- sas
- --
- Steve Suttles Internet: steve@dbaccess.com Dr. DCL is IN!
- CROSS ACCESS Corporation UUCP: {uunet,sgiblab}!troi!steve Yo speako TECO!
- 2900 Gordon Ave, Suite 100 fax: (408) 735-0328 Talk data to me!
- Santa Clara, CA 95051-0718 vox: (408) 735-7545 HA! It's under 4 lines NOW!
-