- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to implement multi-line input recall?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 10:23 PM
тАО03-01-2006 10:23 PM
The last time I checked (which I admit was years ago) the terminal driver itself provided only single line input recall.
I know that you can get 20 line input recall by using SMG$. But I'm guessing that these utilities may do it some other way. Does anyone know how?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 10:35 PM
тАО03-01-2006 10:35 PM
Re: How to implement multi-line input recall?
$ pipe analyze/image sys$system:lancp.exe | search sys$input smg
global section name: "SMGSHR_001"
5) "SMGSHR"
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2006 10:41 PM
тАО03-01-2006 10:41 PM
Re: How to implement multi-line input recall?
I do have the source code to a routine which does do reading a command from the terminal and handing command line recall. I don't know the original author and its written in C.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 12:04 AM
тАО03-02-2006 12:04 AM
Re: How to implement multi-line input recall?
Thanks for your suggestion. For some reason I hadn't thought of that, though it's obvious now. But before I could try it I also read Ian's reply that made it unnecessary.
Ian,
Can you attach the code to which you refer to a reply here? If you'd rather not (since you don't know the author) we can probably arrange some other way of exchanging the details.
Way back when SMG$ was new (boy, how long ago was that??) I did quite a bit of programming with it. I can't claim to remember much now but I'm sure it would come back quickly.
Meanwhile, time allowing, I'll do some experimenting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 12:16 AM
тАО03-02-2006 12:16 AM
Re: How to implement multi-line input recall?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 01:04 AM
тАО03-02-2006 01:04 AM
Re: How to implement multi-line input recall?
If you need reminding of SMG$ then my other utilities use SMG$ routines for command line recall.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 01:12 AM
тАО03-02-2006 01:12 AM
Re: How to implement multi-line input recall?
My thanks. :)
I do have some of your utilities and will take a look at how they do this.
Galen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 08:17 AM
тАО03-02-2006 08:17 AM
SolutionDon't forget, you can use just the input side of SMG, without using any of the output functions.
I've attached a very simple program in Pascal which uses SMG$READ_COMPOSED_LINE. It also demonstrates that you can specify more than 20 lines of recall when you create the virtual keyboard.
>But I'm guessing that these utilities
>may do it some other way.
Since a good programmer is a lazy plagurist, and one of the objectives of OpenVMS is user interface consistency, I'd be hoping that everyone uses SMG for this task.
If you want to find out exactly what routines they're calling, and how, use my FAKE_RTL procedure to build a FAKE_SMGSHR and trace the arguments.
A quick check of SYSMAN shows SMG$CREATE_VIRTUAL_KEYBOARD, SMG#CREATE_KEY_TABLE and SMG$READ_COMPOSED_LINE.
(Also interesting to note that the SYSMAN programmer uses the sneaky trick of passing the string descriptor for the input line as the "RESULTANT-LENGTH" argument)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 08:33 PM
тАО03-02-2006 08:33 PM
Re: How to implement multi-line input recall?
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 11:49 PM
тАО03-02-2006 11:49 PM
Re: How to implement multi-line input recall?
Thanks very much for our excellent suggestions and sample code, and also for FAKE_RTL. I've skimmed your journal article and found it very interesting but haven't read it thoroughly. I hope to try out this technique some time.
John A.,
I first noticed that difference between $ READ and $ INQUIRE long ago when command line recall was still pretty new. I always assumed it was just meant to be that way, so it's nice to hear that the DCL Guy :-) is treating it as a bug.
The original version of VMSLICENSE.COM used INQUIRE instead of READ. This was handy when entering multiple similar licenses. You could just up-arrow to whatever field changed between such licenses (often just the authorization and checksum), edit them, and hit
Later VMSLICENSE.COM was changed to use READ (among other changes) and multi line recall stopped working. I quickly made a modified version of the new procedure that still used INQUIRE. But that was long ago in another life...
Galen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2006 10:56 AM
тАО03-07-2006 10:56 AM
Re: How to implement multi-line input recall?
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2006 10:21 PM
тАО03-07-2006 10:21 PM
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 01:59 AM
тАО03-08-2006 01:59 AM
Re: How to implement multi-line input recall?
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 02:21 AM
тАО03-08-2006 02:21 AM
Re: How to implement multi-line input recall?
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2006 10:06 PM
тАО03-09-2006 10:06 PM