Operating System - HP-UX
1836484 Members
2449 Online
110101 Solutions
New Discussion

Re: Execute script on remote vi ftp

 
Dave La Mar
Honored Contributor

Execute script on remote vi ftp

I wish to execute a script on a remote machine
vi an ftp batch job. (This is going from a mainframe to HP-UX 11.0)
I want the script to kick off and return some sort of return code to the ftp job. I nohup the script because I do not want to wait for the script to finish executing to get a rc. The
mainframe job stream waits for some return code from the execute script before it continues.
Any ideas?
Thanks for any input.
"I'm not dumb. I just have a command of thoroughly useless information."
2 REPLIES 2
linuxfan
Honored Contributor

Re: Execute script on remote vi ftp

Hi dave,

As far as i know, you cannot use ftp(file transfer protocol) to run remote scripts. ftp does have a ! option to start an interactive shell on the local machine, but that's on the machine you invoked ftp from.

However, if there is no other option but to use ftp. there is something you could try.
you could write a script on hp which is running in a loop (checking at certain interval could be 5 minutes, 60 minutes whatever) and is looking for a certain file, which you would ftp from the mainframe to the HP machine, whenever you want the job to run.
This script would save the return code in an output file, and you could ftp this output file from your mainframe and continue with its job.

Now you could also run the script on HP as a cron job, to run at certain intervals (man cron).
Not sure what kind of script you are trying to run, but hopefully this is a start.

-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
Dave La Mar
Honored Contributor

Re: Execute script on remote vi ftp

Thanks RU. That is definitely another way to do it.
Meanwhile, I have found a way to do it with the TCPIP-tools for vse that will return control to vse on the mainframe immediately after kicking off the script.
Thanks again.
"I'm not dumb. I just have a command of thoroughly useless information."