Post by Zane H. Healy
In looking at the "OpenVMS RTL Screen Management (SMG$) Manual" on the
VSI website, they give examples of every language supported, except
C/C++. The manual itself says it's new as of 2019, but also says it's
for HP OpenVMS VAX/Alpha 7.3. :-) Looking at my copy of the manual
for v6, all they did was remove the code for "RPG II".
Does anyone happen to have some basic examples of using the SMG$
Routines in C? As it happens, the example does just what I need, since
it shows how to use SMG$READ_KEYSTROKE.
Yeah, past whatever is in SYS$EXAMPLES, the OpenVMS doc tends to have
gaps. (The "the OpenVMS doc is great!" crowd always goes silent right
about now, too.)
If you have support, ask VSI. They're starting up a support database
offering with examples. Having just checked, they do not yet have an
example of smg$read_keystroke. The predecessor to the VSI database, the
DEC/Compaq/HP TIMA/STARS/AskQ database—which did have lots of source
code examples—is long gone.
The worst of that batch of SMG calls is probably the smg$create_menu
call, and the OpenVMS developers have yet to add an example of that
one, or an example of implementing command-line recall from what I can
find of it. That might be a starting point for you.
As you don't indicate what you're looking for a keystroke read for, and
unless you're already using SMG (possibly for command recall or such,
though that's not well documented), a $qio call is the approach I'd use:
Here are some other SMG examples:
Alas, I don't see a C example of smg$read_keystroke anywhere, and the
eight-cubed source code example coverage doesn't include SMG.
Pure Personal Opinion | HoffmanLabs LLC