Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!think!ames!ucbcad!ucbvax!VCUVAX.BITNET!LANGFORD From: LANGFORD@VCUVAX.BITNET (Bob Langford) Newsgroups: comp.os.vms Subject: RE: checking for valid DCL commands. Message-ID: <8706102225.AA09140@ucbvax.Berkeley.EDU> Date: Tue, 9-Jun-87 09:18:00 EDT Article-I.D.: ucbvax.8706102225.AA09140 Posted: Tue Jun 9 09:18:00 1987 Date-Received: Sat, 20-Jun-87 08:56:44 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 22 > Is there a way to check whether a word is a logical or symbol (something > like DIR*ECTORY or MAIL) without causing errors in DCL? What I would like > to do is check a parameter to see if it is a verb/symbol and $symbol if it is > and $r parameter if it is not. It is easy to see if a string is the name of a DCL symbol, but I don't know a way to see if a string is a currently valid command. However, it is easy to do the reverse: find out if the parameter string is the name of an image file. $ X := f$parse(P2,".EXE") $ if X .eqs. "" then $goto NoSuchProgram ! hope it's a command.... $! Else, it is a program. $ run 'X' ! or RUN 'P2' Hope this helps.... P.S. There was a program called VERB on a past VAX Symposium tape from DECUS that could extract a command verb definition from DCL's tables. I suppose it could be modified to check whether or not a verb is defined.... ...Bob...