From: CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 23-FEB-1989 17:51 To: MRGATE::"ARISIA::EVERHART" Subj: DCL bug... Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu, 23 FEB 89 08:07:20 PDT Received: from MITVMA.MIT.EDU by KL.SRI.COM with TCP; Thu, 23 Feb 89 07:57:37 PST Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (IBM VM SMTP R1.1) with BSMTP id 7878; Thu, 23 Feb 89 10:56:26 EST Received: from UNHH.BITNET (B_COSTA) by MITVMA.MIT.EDU (Mailer X1.25) with BSMTP id 1770; Thu, 23 Feb 89 10:56:24 EST Date: Thu, 23 Feb 89 10:57 EDT From: Subject: DCL bug... To: info-vax@kl.sri.com X-Original-To: info-vax@kl.sri.com, B_COSTA An interesting bug has recently been discovered in DCL which we have confirmed exists in our version 5.0-2 (and Colorado's 5.1) of VMS. The following DCL command procedure causes an error from which DCL cannot recover; the process is thus forced to exit - in effect - logging it off. $ ON ERROR THEN GOTO Abort ! Action to take on any error... $ $ TestP1: IF (P1 .NES. "") $ WRITE SYS$OUTPUT "P1 = <''P1'>" $ ELSE WRITE SYS$OUTPUT "First parameter required." $ ENDIF $ $ End: EXIT $ $ Abort: WRITE SYS$OUTPUT "% Procedure aborted..." $ EXIT $ The "IF" statement is wrong; the "THEN" is missing. This of course causes the DCL error: %DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency Normally this shouldn't be a serious problem. However, the combination of this error and an "ON WARNING" or "ON ERROR" statement like the one above results in an "Improperly handled condition" and *poof* -- no process! In the final analysis, this is more of an inconvenience than anything else; if your command procedure has what amounts to a syntax error - you probably don't want it to run anyways - it's just annoying to get blown off the system too! Of course it does mean that if you have a big job that calls other procedures, and one of these procedures has such an error - the caller does not have a prayer of recovering in any way. BC ## ## ## ## +-------------------------------------------------------+ ## ### ## ## ! Bill Costa PHONE: (603) 862-3056 ! ## #### ## ## ! University of New Hampshire BITNET: W_COSTA@UNHH ! ## ## ## ######## ! USNH Computer Services UUCP: uunet!unh!wfc ! ## ## #### ## ! Durham, NH 03824 ! ## ## ### ## ! USA "No good deed goes un-punished." ! ####### ## ## +-------------------------------------------------------+