home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: command procedure calling
- Date: 27 Jan 1993 01:38:08 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 28
- Distribution: world
- Message-ID: <1k4p20INNjbq@gap.caltech.edu>
- References: <ERMIMWEI.20@er.ele.tue.nl?>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- 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 :-).
-
- 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.
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-