Re: FTP from Mainframe to Unix to create a dynamic file name on the Unix



First decide where the "correct" name should be given .....

Option-1 on the MF-side
I guess your mainframe FTP-script is something like this

open that_unix_server
unix_usid unix_pw
put local_file remote_file

Maybe there is a CD somewhere to put it in the right place.
Make the remote_file variable using a REXX or whatever script as
suggested by DD.

Try to find out wheter it's allowed to rename the remote_file. Still
the remote_file must be provided from your MF.

Option-2 leaving it up to the UNIX jockies
Run a shell script that looks somehow like using the KORN shell

#!/bin/ksh
new_name="file_created_in_"
extension=".txt"
month = `ls -l original_file | cut { the column that holds the
datestamp of your file}`
year= `date "+ %Y"`
mv original_file $new_name$year$month$extension

Maybe you have to change the single quotes to double or vice versa.
Anyhow, you can pimp this script by calling with the original_file as
a parameter, etc


Succes,

Kees


.