Page 1 of 1

FTP flat file to mainframe as PS

Posted: Wed Aug 30, 2006 8:18 am
by xch2005
Hi,

Can anybody help me to FTP and flat file available in Unix server to mainframe as PS file in Parallel extender.

How to FTP the file?

Thanks for your time.

Posted: Wed Aug 30, 2006 9:40 am
by dang
Here is what we use to ftp from Windows to the mainframe. In a transformer step, we build the ftp commands using ETL parameters as follows putting the commands into a text file with a suffix of FTP:

"open xxxxxx" : Char(13) : Char(10) :
"user" : Char(13) : Char(10) :
MAINFRAME_FTP_USR : Char(13) : Char(10) :
MAINFRAME_FTP_PWD : Char(13) : Char(10) :
"lcd " : BASE_PATH : "\data_out" : Char(13) : Char(10) :
"quote site lrecl=" : DSLink2.MAINFRAME_REC_SIZE : " blksize=0 recfm=fb pri=" : DSLink2.MAINFRAME_DSN_ALLOCATION : " sec=" : DSLink2.MAINFRAME_DSN_ALLOCATION : " tracks" : Char(13) : Char(10) :
"put " : SOURCE_FILE : ".CSV '" : DSLink2.TARGET_DATA_FILE : "'" : Char(13) : Char(10) :
"quit" : Char(13) : Char(10)

After the text file has been built with all of the commands, we use the Routine Activity with the ExecDOS routine name to issue the following command:
"ftp -v -n -s:" : BASE_PATH : "\work\FTP_TO_MAINFRAME_" : SOURCE_FILE : ".FTP"

Hope this helps.