Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-crg!styx!ames!ucbcad!ucbvax!AC.UK!SYSMGR%UK.AC.KCL.PH.IPG
From: SYSMGR%UK.AC.KCL.PH.IPG@AC.UK
Newsgroups: mod.computers.vax
Subject: Parsing command line exactly as typed
Message-ID: <8612011840.AA29458@ucbvax.Berkeley.EDU>
Date: Mon, 1-Dec-86 13:40:31 EST
Article-I.D.: ucbvax.8612011840.AA29458
Posted: Mon Dec  1 13:40:31 1986
Date-Received: Mon, 1-Dec-86 21:12:09 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 31
Approved: info-vax@sri-kl.arpa


> Is there a way in VMS 4.4 to retrieve the command line exactly as the
> user typed it, without having DCL chomp on it.
> Among the many features of LIB$GET_FOREIGN(),
> DCL converts case, ignores text after !, and invokes its own quoting mechanism
> I simply wish to obtain exactly what the user typed.
> I am willing to work in almost any language to get this done.
> Is this possible ?

I always thought DCL was a rats nest and now I know it is. The following was
determined experimentally on VMS 4.3 and, as far as I know, is not documented
anywhere so it may well break later. However...

The obvious is to set up the foreign command (to invoke TEST:TEST) as
TEST :== $TEST:TEST "

The idea being that everything following the double quote, until CR, will
be unprocessed by DCL. You then just ignore the first character returned
by LIB$GET_FOREIGN. It doesn't work!

However,

TEST :== $TEST:TEST """

 seems to work fine. You can then handle text like $TEST This is OK!! isn't it?
although double quotes probably foul up.

Nigel Arnot (Dept. Physics, Kings college, Univ. of London;  U.K)

Bitnet/NetNorth/Earn:   sysmgr@ipg.ph.kcl.ac.uk (or) sysmgr%kcl.ph.vaxa@ac.uk
       Arpa         :   sysmgr%ipg.ph.kcl.ac.uk@ucl-cs.arpa