home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22015 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  2.7 KB

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