[mod.computers.vax] Submission to mod.computers.vax

sjs@wucs2.UUCP (Steven J. Sadoff) (11/30/86)

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 ?

Steven Sadoff   (314)652-3200
Central Institute for the Deaf, 818 S. Euclid, St. Louis, MO 63110
UUCP:    sjs@wucs.UUCP          or    ..!{ihnp4,seismo}!wucs!sjs
ARPANET: wucs!sjs@seismo.ARPA         CSNET: wucs!sjs@seismo.ARPA%csnet-relay

LEICHTER-JERRY@YALE.ARPA (12/01/86)

    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 don't believe this is possible.  You might try using the $REST_OF_LINE CLD
type, but I'm pretty sure you'd be handed the "cleaned up" version of the rest
of the line, not the original text.

If you absolutely MUST have the information in this form, you could probably
read it out of some buffer inside of DCL.  Finding it would take some intense
fiche reading, and of course the result would be highly likely to break with
each new version of VMS.  I would strongly recommend finding some other solu-
tion.

Note:  In many cases, you can do something like this:

	COMMAND == "$prog """

Then when COMMAND is used, there is a free open quote, and case, spacing,
"!"'s, and so on are preserved.  DCL will supply a free "virtual close quote"
at the end of the line, so that's not a problem.

Of course this fails if you ever need to use a quotation mark in an argument
to COMMAND - you'd need to double it:

	COMMAND This is a quote: ""

Typing:

	COMMAND This is a quote: "

instead will pass 'This is a quote: ' to COMMAND; embedded quotes will produce
odd error messages.
							-- Jerry
-------

bdklassen@watnot.waterloo.edu (Brent Klassen) (12/02/86)

In article <8611301720.AA03479@wucs2.UUCP> sjs@wucs2.UUCP writes:
>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.

How about using the DCL command: $ read sys$command /prompt="" line
where line is the symbol that will contain the input line.