Operating System - OpenVMS
1753820 Members
8887 Online
108805 Solutions
New Discussion юеВ

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

 
SOLVED
Go to solution
Ragavendran_1
Occasional Advisor

DCL Programming - Executing COM files in remote machine through FTP/TELNET

Hi All,

I have the following things to be done, kindly suggest me which one will do FTP / TELNET.

1. Connect to remote machine.
2. Execute the COM files, (Logicals pointing to
directories should locate to the remote)

I am trying to create a DCL script to do this, i have options in FTP using SPAWN command or any command using TELNET connection.

Kindly help me in figureout the better way.

Regards,
Ragav.
24 REPLIES 24
Rexx
New Member

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

Not sure exactly what you mean but you could setup a remote proxy on your destination system and then run your COM from your source system if both systems are running vms and can connect via decnet

e.g.

On destination system (NODE2) add the following proxy

LOCAL:.NODE1::user_name
user_name (D)

From source system (NODE1) you can execute the COM file on destination system (NODE2)

e.g. @NODE2"user_name"::ABC.COM


Joseph Huber_1
Honored Contributor
Solution

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

If the DECnet remote executionn is not available (only TCPIP ?), then no, telnet or ftp is not the right direction, but rsh/rexec or the secure SSH.
e.g.
RSH remotenode "@test.com"
SSH remotenode "@test.com"

For RSH You need TCPIP communication proxies defined (assuming it is "HP TCPIP services for VMS", see TCPIP HELP ADD PROXY),
for SSH proper authorization (public key, host based ...).
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

Ragav,
>> have options in FTP using SPAWN command

This is a misunderstanding of the SPAWN command in (VMS-) FTP:
it spawns a subprocess on the LOCAL node, i.e. the node where the ftp client is invoked, does not execute on the remote node, i.e. the one the ftp client has opened.
To send a command to the remote ftp server, the quote command is the right tool.
But I doubt any FTP server will execute a SPAWN command.
try "quote spawn show time" on your site !
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

Finally, in addition to the DECnet remote object execution, which is "synchronous", i.e. DCL is waiting until the remote job ends, there is the possibility to submit a batch job to the remote node.
See HELp SUBMIT /REMOTE .

Example:
SUBMIT/REMOTE remotenode::test.com

But be aware, this batch execution is restricted to the remote nodes SYS$BATCH queue, and the logfile is always printed to the remote SYS$PRINT.
http://www.mpp.mpg.de/~huber
Ragavendran_1
Occasional Advisor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

Wow.. Thanks for immediate reponse.

My problem is to run the COM file which is present in the remote system (R1)
i need to connect from the localnode (L1) using FTP/ TELNET.

I can connect to R1 by

$ FTP R1_addr
User
pass
SET DEF ld_disk1:[xxx.bin]
SPAWN @PROGRAM.COM

// Here the logicals present in the com files refers to the L1 instead of
R1. So the files accessed in the R1 COM refers to L1 file.

REXX:

I am sorry, i dont know how to set up the proxy for the remote node (R1).
That will be not a good idea to, since the remote node is not stable it will change
every time.

JOSEPH:

Yes, i agree we can use the SPAWN command in the local node, as you said
the file accessing mechanism fails here. the file location points to the local node(L1) in stead of remote node (R1).

Sorry, the QUOTE command is not avalible in my system. If it there it would be great help. ok let me try some other functions.

SUBMIT command looks good for me, one problem is i need to specify the directory in the
command my COM file is in ld_disk1:[xxx.bin] and program.com is the file in R1.


$ SUBMIT/REMOTE RNODE::ld_disk1:[xxx.bin]PROGRAM.COM
%SUBMIT-F-OPENIN, error opening ld_disk1:[xxx.bin]PROGRAM.COM; as input
-RMS-E-FND, ACP file or directory lookup failed
-SYSTEM-F-INVLOGIN, login information invalid at remote node

I Landup with the above error.

Kindly let me know how to set the directory options.

Regards,
Ragav
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

The remote submit needs DECnet proxy in the same way as the remote object execution as described by Rexx,
or You have to specify "user password" in the remote node specification like
remotenode"user password"::
which of course is not a good idea.

I don't know what You mean to be not able to use proxies "because nodes change"?
Of course You need the proxies for all possible nodes where You want to execute.
The same applies for RSH, just the proxies are not DECnet but TCPIP proxies, and they are (unfortunately or fortunately) different sets of proxies.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

I forgot to answer this
>>Kindly let me know how to set the directory options.

There is nothing to set directories. My example was just assuming test.com in the users home directory, of course the full syntax is
submit/remote node"user pw"::dev:[dir]file.typ

The error was because "login information not valid": missing proxies or "user pw" as explained in last reply.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

And to make testing shorter:
Yiou can test of course before making the proxy entries: just use
RNODE"user password":: for the remote node string.
or
RSH/user=user/password=pw rnode command

and define the proxies later for production.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: DCL Programming - Executing COM files in remote machine through FTP/TELNET

My final tip for remote command execution (not just command files):
Install the REMOTE command:
http://wwwvms.mppmu.mpg.de/util_root/com/remote.com

Then execution is as simple as
REMOTE rnode show users/full

http://www.mpp.mpg.de/~huber