FTP flat file to mainframe as PS

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

FTP flat file to mainframe as PS

Post 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.
dang
Charter Member
Charter Member
Posts: 5
Joined: Thu Oct 28, 2004 8:58 am

Post 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.
Post Reply