On Thu, 2010-09-16 at 16:35 -0500, Paul Gilmartin wrote:
> On Thu, 16 Sep 2010 15:47:59 -0500, Harris, Randy wrote:
> 
> >Trying to do an ftp from mainframe (z/OS v1.7) to a network server.
> >I would like to be able append the system date to the dataset in the put 
> >statement.
> >Is there a symbolic parameter for date that will allow me to do this?
> >
> I believe that in the newest z/OS release (1.12?) FTP will
> be able to take its input from a named pipe (FIFO).  With
> this, you could achieve your result by concatenating
> the output of date(1) and your data set into such a pipe.
> 

I think that is referring to accessing a named pipe in the PUT or GET
ftp subcommand. Not for using a pipe to send the commands to the ftp
processor.

For PGM=FTP, I cannot think of an EASY way to do this. Using Co:Z to
launch a shell session to do the FTP, it is brain dead easy.


//FTPSTEP EXEC PROC=COZPROC
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD *
YYMMDD=$(date +%C%m%d)
ftp -e server.ip.address <<EOF
userid password
put 'randys.test.ftp.dataset' 'randys.test.ftp.dataset.${DYYMMDD}'
EOF
/*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to