HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

Telnet and OpenVMS control chars

Occasional Visitor

Telnet and OpenVMS control chars


I'm developing a screen scraping app in VB.Net that will connect to an OpenVMS system. I've got as far as being able to connect, login and pass simple commands where required, such as when asked to select option 1, 2, or 3, sending the correct key code returns the data I need.

The problem I am having is one of the options requires I hit the F10 key (if I was using an emulator) and try as I might I cannot seem to pass the correct value. If I look at the key mapping for the emulation package EMSoft I see the F10 key is sent as /27[212~ but this does not seem to work for me.

Does anyone have any experience of doing this who could possibly point me in the right direction?

Many thanks

Honored Contributor

Re: Telnet and OpenVMS control chars

What doesn't work?
What happens?
What (else) have you tried?

If you're not already, please ensure you're familiar with how escape and control sequences work, and forget what you know about the PC keyboard and keycodes and Windows keyboard programming here.

That is not, BTW, F10.

F10 in eight-bit:

CSI 2 1 ~

In seven-bit:

ESC [ 2 1 ~

Poke around at vt100.net or in your VT-series terminal manual of choice. For the core sequences, see SMGTERMS.TXT

$ search sys$system:smgterms.txt f10

The basics of control sequences are described in the OpenVMS I/O User's Reference Manual, in the section on the terminal driver. If you don't know the architecture of the sequences, go take a look at that now.

It is feasible to screen-scrape using pseudo-terminals on OpenVMS, and to then pass communications over the wire. To keep the encapsulation entirely on OpenVMS, to pass over network messages, and thus to give the future legacy Windows application developers a saner starting point when they're maintaining and porting this stuff you're working on.

And if you're looking at this stuff, do not use the Windows-integrated Hilgreave Hyperterm. Get PuTTY or get the current Hilgreave Hyperterm, or get the VTstar tool off the older Freeware. That latter one is the actual VT code, built as a terminal emulator. The integrated Hilgreave Hyperterm is really bad. These and various other options are far better terminal emulators.

Stephen Hoffman
HoffmanLabs LLC
Steven Schweda
Honored Contributor

Re: Telnet and OpenVMS control chars

> {...] /27[212~ [...]

Huh? My VT 220 Programmer Pocket Guide says:

CSI 2 1 ~

where CSI could be ESC [ (7-bit) instead of
a real CSI (8-bit) %x9B.

Hard to believe that a Web search couldn't
resolve this.
Occasional Visitor

Re: Telnet and OpenVMS control chars

Hi guys and thanks for the prompt responses.

Steven, please understand that I know absolutely nothing about OpenVMS or the Alpha so if my question seemed rather basic, sorry.

Thanks for your comments and pointers, they are really, really helpful. I am onsite again tomorrow and will go through your post to see what I can figure out.

Will let you know what transpires.

Thanks again.
Honored Contributor

Re: Telnet and OpenVMS control chars

We all started out with no knowledge of the platform.

Don't force-fit a familiar solution in an unfamiliar and disparate environment. And don't avoid an easier solution simply because you're unfamiliar with it.

That is the path of frustration.

Familiarity can sometimes breed contemptible code.

There can be alternatives to screen-scraping, and there can be other approaches toward encapsulating a tool that does need to screen-scrape. And if you are going to screen-scrape, there are almost certainly tools and libraries around that can do that for you. (The pseudo terminal APU stuff is discussed in a couple of places in the OpenVMS manual set; there's a full PTD library for that.)

I prefer to avoid spreading around application-level knowledge of the innards of how one operating system or one platform is implemented along to another disparate platform; to encapsulate, privatize and objectify this data.

Steven Schweda
Honored Contributor

Re: Telnet and OpenVMS control chars

> [...] I know absolutely nothing about
> OpenVMS [...]

The key to finding the info is realizing that
it's a _terminal_ question, not a computer or
OS question. Thus, knowing nothing about
VMS is actually not much of a handicap.
Well, not for the F10 question, anyway.
Wim Van den Wyngaert
Honored Contributor

Re: Telnet and OpenVMS control chars

I used KEA!X and in keyboard mapping I could remap the keys. Could it be that F10 is mapped to something different from F10 ?

Bojan Nemec
Honored Contributor

Re: Telnet and OpenVMS control chars


Alittle trick to find what is sent by the terminal or the emulator.

Login to the VMS thru the emulator. Edit a dummy file with the EDT editor (EDIT/EDT dummy). When in keypad mode (normal editing) press the ESC key (better CTRL[ so you are shure that the ESC key is not remmaped by the emulator) and after that the key you want to see what it sends. The editor will insert the whole escape sequence.

For example if you press
the editor will insert:

This works because in the EDT editor two consequent ESC means that you want insert an ESC in the text.