1753518 Members
4975 Online
108795 Solutions
New Discussion юеВ

Re: ftp script

 
YE LIU_1
Frequent Advisor

ftp script

Dear VMS Users,

I am trying to find out a FTP script to transfer files in batch. I tried "ftp /INPUT" and it gives me error as:

%DCL-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement
\INPUT\

Can you give me an example?

YE LIU

6 REPLIES 6
Joseph Huber_1
Honored Contributor

Re: ftp script

Please tell us:
VMS version, TCPIP stack and version, FTP client and version.

If You type FTP without arguments it will tell You client program and version.
If the client is e.g. HGFTP, then it has no /INPUT qualifier, but You can put commands into SYS$INPUT.
http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: ftp script

> Please tell us:
> [...]

Always good advice. Also:
show symbol ftp

It's also often useful to describe the actual
problem you're trying to solve, instead of
describing what went wrong with your attempt
to solve that problem. For example, if
you're trying to fetch files, you may find a
program like wget useful. In either
direction, COPY /FTP can be useful, if your
VMS version is not too old.


> If You type FTP without arguments it will
> tell You client program and version.

Really? Around here:
alp $ tcpip show version

HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2

alp $ ftp
FTP>

Not very informative.
YE LIU_1
Frequent Advisor

Re: ftp script

Thanks.

The ftp version is:

MultiNet FTP user process V4.4(119)

Can you show me how to use sys$input to script ftp commands?

Thanks,

YE LIU
Jim_McKinney
Honored Contributor

Re: ftp script

$ help multinet ftp /take

MULTINET

FTP

/TAKE_FILE

/TAKE_FILE=file

Causes FTP to execute commands from the specified file before
entering command mode. This qualifier is functionally equivalent
to re-directing SYS$INPUT:.
John Gillings
Honored Contributor

Re: ftp script

YE,

If your script is variable, you may want to use PIPE to feed commands into FTP:

$ ws="WRITE SYS$OUTPUT"
$ PIPE (ws "SET PASSIVE ON" ; -
ws "ls ''dstdir'''dstfile'") | -
FTP /INPUT=SYS$PIPE /USERNAME="''dstuser'" /PASSWORD="''dstpass'" 'dstnode' | -
(... pipe segment to catch and process output)

(I assume something similar can be done with Multinet)

On the other hand, if it's a simple file transfer, COPY/FTP or RCP is the way to go.
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: ftp script

> [...] COPY/FTP or RCP is the way to go.

Or, with a bit of effort, Kermit's FTP client
can be made to work on VMS, and it offers
rather extensive scriptimg capability. But
I'd guess that the poster wouldn't care.