Operating System - OpenVMS
1753744 Members
4942 Online
108799 Solutions
New Discussion юеВ

Associating a Telnet device with a terminal server port

 
Stephen Daddona
Frequent Advisor

Associating a Telnet device with a terminal server port

For the last 14 years, we've been using DECserver 300 and 700's to talk to Scantron Corp. Optical mark scanners. We create a LAT device, specifying the terminal server name and port. I've been asked to look into using TCP/IP instead of LAT. I got one of our DECserver 700's to talk to our network via TCP/IP, but I've been unable to get a satisfactory answer on how to associate a Telnet device (TNAx - created with CREATE_SESSION) with a physical port on the terminal server.
Any ideas out there?
Thanks in advance!
5 REPLIES 5
John Gillings
Honored Contributor

Re: Associating a Telnet device with a terminal server port

Craig,

TELNET CREATE_SESSION is somewhat limited. It's really only useful for creating devices to send date to printers. I've never been able to get it to work properly for a transmit/receive device.

Even LAT, strictly speaking, requires a program to perform the right LAT $QIO calls to establish the session "properly". In practice you can usually get away with creating the LAT device, OPENing it and writing, but strictly speaking that's not supported.

The "right" way to do this is with a purpose built program issuing $QIOs to communicate with the device. Maybe you can build a little I/O package into your application to hide the details?
A crucible of informative mistakes
David B Sneddon
Honored Contributor

Re: Associating a Telnet device with a terminal server port

Craig,

If you define a listener port (I think) on the
DECserver for the particular port you can then
address it via "a.b.c.d:port". Obviously you
will need to modify the code. We have sucessfully
converted some LAT stuff to IP using the NETLIB
package (available on the Freeware V4, or get
the latest from Hunter's site or Madgoat).
Using NETLIB can make your code IP stack independent
and it is easy to use. As John suggests, you
may want to create a "layer" within
the application to hide this stuff from the
main code.

Regards
Dave
Kjell Carlsson
Frequent Advisor

Re: Associating a Telnet device with a terminal server port

Craig,

You can use the following command to create a TNA and associate to a port:
$telnet ipaddress /create_ses/protocol=none-
portnumber unit

The created device will be named TNAunit:

To delete the device:
$telnet /delete unit

I have used this for DECserver 90TL.

A more reliable but more complicated way is to within the program code create a connection to a DECserver port. I also have examples to that if you are interested.

In all cases you must define the DECserver to listen for telnet requests.

Kjell
Bojan Nemec
Honored Contributor

Re: Associating a Telnet device with a terminal server port

Craig,

John and David are right. The "right" way is write a program. You can use $QIO s or using
sockets (please see various "client" examples in the TCPIP or UCX directory of SYS$EXAMPLES).
If you want try with the TELNET CREATE_SESSION
then try to write some dummy data to the created device. Do this yust after creating the device. This will (probably) establish the connection to the port and you will be able to receive data from it.

Bojan
Vouters
Advisor

Re: Associating a Telnet device with a terminal server port

Hi,

The program at the following URL
http://h18000.www1.hp.com/support/asktima/communications/00A1302D-E940C6C9-1C02A1.html
works both in transmit and receive ways.
Hoping this can help.
Philippe