Here's how we construct and run an ftp command file to put files onto an
NT 4.0 server.

parm localfile="",hostfile="", method="ascii"

comment Put a file on Baltic
setvar sfile "!hostfile"
setvar dfile "!localfile"
if dfile = "" then
   setvar dfile "!hostfile"
endif
if sfile = "" then
   echo putbalt Usage: putbalt hostfile localfile method
   echo                Will use ftp to put a file
   echo                onto baltic.
   echo                Requires method, either ascii* or binary
   escape
endif
echo exitonerror                               >  ftpcmds
echo open baltic.bankmed.co.za                 >> ftpcmds
echo user administrator *****                  >> ftpcmds
echo !method                                   >> ftpcmds
echo put !localfile !hostfile                  >> ftpcmds
echo quit                                      >> ftpcmds
run ftp.arpa.sys;stdin=ftpcmds
if !ftplasterr<> 0 then
  echo ||||||||||||||||||||||||||||||||||||||||||||||||
  echo !ftplastreply
  echo !ftplastmsg
  echo ||||||||||||||||||||||||||||||||||||||||||||||||
endif


Hope this helps


Neil Harvey

> -----Original Message-----
> From: HP-3000 Systems Discussion [SMTP:[log in to unmask]] On
> Behalf Of Johnson Stephen
> Sent: 27 February 1997 05:56
> To:   [log in to unmask]
> Subject:      FTP file variable
>
> If I have file adcatscz and I want to FTP it with the name a970227,
> (todays date) .........
> what variable or system verb would accomplish the rename ?
> Can you FTP a backreference (*) ?
> an help is welcome or I'll construct the jcl in the program and stream
> it.