Operating System - OpenVMS
1827811 Members
1884 Online
109969 Solutions
New Discussion

Re: Non interactive telnet service

 
SOLVED
Go to solution
Rajarshi Gupta
Frequent Advisor

Non interactive telnet service

I am trying to write a DCL script to telnet to a switch and execute some set of command on it, as we need to automate lengthy manual procedure.
The programme gets error as it is not allowing interactive telnet service through DCL/batch job. Thought of using vms virtual terminal to do the job as programming is not possible in the switch end. But unable to find any reference on how to do DCL programming of virtual terminal(VTA).
It will be of great help if a piece of example on this is provided, or some sort of link which has similar DCL programming example.
16 REPLIES 16
Ian Miller.
Honored Contributor
Solution

Re: Non interactive telnet service

I think kermit is good for scripted telnet connections.
____________________
Purely Personal Opinion
Robert Gezelter
Honored Contributor

Re: Non interactive telnet service

Rajarshi,

I concur with Ian.

C-Kermit is fully scriptable, and well documented.

It can be obtained from http://www.columbia.edu/kermit

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
Rajarshi Gupta
Frequent Advisor

Re: Non interactive telnet service

Thanks to all for quick response
Is there no way of doing it using DCL?
Robert Gezelter
Honored Contributor

Re: Non interactive telnet service

Rajarshi,

In short, no. The telnet utility was never designed for providing scriptable capabilities. OpenVMS Virtual Terminals are within a system, not remote.

C-Kermit has generally, in my experience, been the choice for projects such as you describe. Of course, many people have implemented scripting capabilities of some form, for their own purposes.

Taking the risk of reading Ian's thoughts, I suspect both Ian and myself are in agreement that C-Kermit provides the most functionality and documentation for a project such as you describe.

- Bob Gezelter, http://www.rlgsc.com
Steven Schweda
Honored Contributor

Re: Non interactive telnet service

It's a trend. I have a DCL procedure (using
Kermit) to reset my Cisco 678 DSL
modem/router automatically when I can't
reach my ISP. It's much easier using Kermit
than any other way I've seen.
labadie_1
Honored Contributor

Re: Non interactive telnet service

Have you tried

Telnet Client Accepting Non Interactive Commands


http://h18000.www1.hp.com/support/asktima/appl_tools/009E60A3-96F8B0E0-1C0186.html

It works fine
Robert Brooks_1
Honored Contributor

Re: Non interactive telnet service

Unless I misunderstand your question and the other respondents, I believe that this is quite easy to do from DCL.

I have a command procedure (written by someone else within VMS Engineering) that logs into a fibre channel switch and disabled/enables various ports in an effor to simulate connectivity problems.

I don't want to post it here, as it's quite tailored to our environment, but there are just a few key issues.

1) the use of the TELNET command in conjunction with the /CREATE_SESSION qualifier

2) the use of the DCL command OPEN /WRITE lognam TNA in order to send commands to the switch.

This, of course, works with our TCP/IP product; I have no idea what (if anything) would need to be different for someone else's implementation.

Of course, I fully concur that Kermit is also a great alternative.

-- Rob (VMS Engineering)
Phillip Thayer
Esteemed Contributor

Re: Non interactive telnet service

Rajarshi,

You might want to look at the thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1030968

This is almost exactly the same as what was covered there.

Phil
Once it's in production it's all bugs after that.
Rajarshi Gupta
Frequent Advisor

Re: Non interactive telnet service

Rob,

Could you please send us your peace of DCL code as sample though it is customised for your environment. We will try to tailor to our environment.

thanks
labadie_1
Honored Contributor

Re: Non interactive telnet service

Rajarshi

For a little example on the use of telnet/create, see
http://dcl.openvms.org/stories.php?story=03/09/23/7962305

It is a very basic tool, in order to see if a remote node has some software running on port 8088.
Wim Van den Wyngaert
Honored Contributor

Re: Non interactive telnet service

Labadie,

What is the difference with a simple telnet/port and testing the status ?

Wim
Wim
labadie_1
Honored Contributor

Re: Non interactive telnet service

Wim

I am not sure I understand what you mean, can you elaborate ?
Robert Brooks_1
Honored Contributor

Re: Non interactive telnet service

Here is the command procedure -- good luck!



-- Rob
Robert Brooks_1
Honored Contributor

Re: Non interactive telnet service

Hmmm, I'll try again . . .
Rajarshi Gupta
Frequent Advisor

Re: Non interactive telnet service

Rob,

I am unbale to detach the file. Could you please attach as a text file.

Thanks
Duncan Morris
Honored Contributor

Re: Non interactive telnet service

Rajarsi,

here is Robert's procedure as a text file...

Duncan