Operating System - OpenVMS
1753386 Members
6878 Online
108792 Solutions
New Discussion юеВ

Re: How to implement multi-line input recall?

 
SOLVED
Go to solution
Jess Goodman
Esteemed Contributor

Re: How to implement multi-line input recall?

I don't see how you can call the command line recall difference between INQUIRE and READ SYS$COMMAND a bug. Yes they're different, but they've always worked that way (since command recall was added).

Some command procedures I write use READ to input lots of individual parameters and I don't want them filling up my command recall buffer. On the other hand I use INQUIRE a few places where I want command recall to work, like in a procedure to execute commands on a remote node vis DECnet.

There is one behavior of INQUIRE I detest though. It's not a bug either, but it is a bug magnet! There is no way with INQUIRE to differentiate between empty input and end-of-file - they both set the symbol name to the null string. Could we get /END=label added to INQUIRE?

Also I hate it when some innocent little bit of DCL code using INQUIRE that was originally written for interactive use but is then incorrectly submitted as a batch job gets into an infinite loop without so much as an error message:

$reprompt:
$ inquire string "Prompt"
$ if (string .eqs. "") then goto reprompt
$ show symbol string
$ exit

On the other hand READ SYS$COMMAND even with /END=, when run from a batch job will actually read the next line of DCL ($ and all) in the command procedure as input. That DCL line won't execute. Now that's just wrong!
I have one, but it's personal.
Galen Tackett
Valued Contributor

Re: How to implement multi-line input recall?

Jess,

> I don't see how you can call the command line recall difference between
> INQUIRE and READ SYS$COMMAND a bug.

Ah, but Mr. DCL Guy himself apparently called it a bug before I merely echoed him, as you'll see in the reply just before the one where I used the word myself. :-)

I just thought that the story about the change in VMSLICENSE.COM might be an interesting historical note.

However I have a strange idea of what's interesting. As an acquaintance long ago put it, perhaps echoing someone famous:

"Everything must be interesting, because if there were something which weren't, that alone would make it interesting."

(I believe I first heard this back around 1977 from an older denizen of the Cal State University, Hayward Computing Lab who was named Leo. He was a campus math/CS wiz who had what may have been a German accent. Also his hair was generally in disarray, but that's all the resemblance that he bore to A. Einstein.)

Regards,

Galen
Joseph Huber_1
Honored Contributor

Re: How to implement multi-line input recall?

The mother of programs using smg$read_composed_line was written 1988 by Hunter Goatley in Vax Macro as
HG$GET_INPUT.MAR as a replacement for LIB$GET_INPUT.
I kept it in http://wwwvms.mppmu.mpg.de/vmssig/src/mar/hg$get_input.mar

And for those not believing Vax macro will work beyond Alpha, here is a version in C:
http://wwwvms.mppmu.mpg.de/~huber/util/hg$get_input.c

Servus,
http://www.mpp.mpg.de/~huber
John Abbott_2
Esteemed Contributor

Re: How to implement multi-line input recall?

Jess, the best thing you can do is email dcl@hp.com your thoughts.

I've always recieved a reply from Guy that's had some thought put into it! You never know, what you ask might just get added !!

Kind Regards,
John.
Don't do what Donny Dont does
Galen Tackett
Valued Contributor

Re: How to implement multi-line input recall?

Thanks to all for your help here. Ian's sample code showed me just how easy this was to do with SMG$READ_COMPOSED_LINE.