- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: telnet in DCL script
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
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
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
тАО05-02-2007 06:43 PM
тАО05-02-2007 06:43 PM
telnet in DCL script
I have few vms nmachines with a user which is common for them and password also same.
I preparing a script to login to these machines using telnet and to do some activities and come out.
How to achieve telnet in script? I know how to do it in shell scripting in unix ? how to do it in dcl? Plese give example
as I am new to dcl scripting and in learning stage
Thanks & Regards
Jayakrishnan G Naik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 08:01 PM
тАО05-02-2007 08:01 PM
Re: telnet in DCL script
Do the following within your DCL Commandprocedure
$ DEFINE/USER SYS$INPUT SYS$COMMAND
$ Telnet 'host'
This should help
Regards
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 08:04 PM
тАО05-02-2007 08:04 PM
Re: telnet in DCL script
I would suggest an alternative, as you know something about unix, the "R" commands exist on VMS and might simplify your task.
ie.
$ rsh other_node @script
Test to see if this command is available with
$rsh same_node show time
and
$rsh other_node show time.
If these commands work, fine if not theres a few steps to be done to get it working.
Let me know.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 09:09 PM
тАО05-02-2007 09:09 PM
Re: telnet in DCL script
I would suggest two options for work using proxies facilities:
First case:
Using DECnet proxies defined to common user between master and slaves machines, you can execute a script with activities to execute i.e.
MASTER>@SLAVEn::script.com
with script.com copied on sys$login directory of common user in SLAVE1,2,3... nodes
$!script.com
$sho time
$dir *.com
...
$exit
Second case:
Using TCP/IP proxies defined to common user on slaves machines and using rsh facilities as Steven said.
Saludos.
Daniel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 11:17 PM
тАО05-02-2007 11:17 PM
Re: telnet in DCL script
Telnet Client Accepting Non Interactive Commands
http://h18000.www1.hp.com/support/asktima/appl_tools/009E60A3-96F8B0
E0-1C0186.html
It works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 01:07 AM
тАО05-03-2007 01:07 AM
Re: telnet in DCL script
I didnt understood ur reply.
Can you clarify this for me?
what this does?
where I have to keep the username and password in the script?
etc....
"$ Define/user sys$input sys$command
$ telnet host"
Regards
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 02:41 AM
тАО05-03-2007 02:41 AM
Re: telnet in DCL script
If a commandfile executes sys$input points to the commandfile itself.
$ DEFINE/USER SYS$INPUT SYS$COMMAND
$ TELNET 'host'
The first line redefines SYS$INPUT for only the next time SYS$INPUT is used (/USER).
If You do a telnet within your Commandfile without the line '$ define/user ...' you will never be able to enter a Username and a password.
But I dind not understand your question correctly in the beginning and so my answer is of no use in this case.
I think another possibility to solve a problem like this is to use task-task communication.
On Node B (there where you like to do something) you could have a commandprocedure like this:
B.COM
$ OPEN/READ in SYS$NET
$ READ in record
$ 'record'
$ CLOSE in
$ EXIT
On node A (There where you start the whole thing) You can have a procedure similar to this:
A.COM
$ READ/PROMPT="Enter Username on node B " SYS$COMMAND username
$ SET TERMINAL /NOECHO/PERMANENT
$ READ/PROMPT="Enter Password for ''username' on Node B" SYS$COMMAND password
$ SET TERMINAL/ECHO/PERM
$ WRITE SYS$OUTPUT ""
$ OPEN/WRITE remote nodeb"''username' ''password'::"0=B.COM"
$ WRITE remote "command to execute on node B"
$ CLOSE remote
You must extent the procedures so that they fit your needs.
Another Possibility would be to use SSH. With SSH you can execute a command or a commandfile on a remote node. If you would use private and public key authentication then you can organize it, that you dont have to supply a password.
$ SSH username@nodeb DCL-Command-to-execute-on-node-B
Or You can use RSH as suggested by 24x7
I would assume that the solution of Daniel will not work, because:
IF you do something like @nodeb::test.com
then test.com resides on nodeb, but the commandfile will be executed on nodea. To test this write a commandfile with one line
test.com
$ WRITE SYS$OUTPUT F$GETSYI("NODENAME")
Copy this file to nodeb and the enter on nodea @nodeb::test
It will write the nodename of nodea on your screen.
Hope that helps
Regards
Heinz