FTP Stage in PX

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
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

FTP Stage in PX

Post by Deepakinstyle »

Hi All,

I have tab delimited ASCII text file created by one of the job. The file has been created in ETL server and my requirement to move the file to a diiffrent server(application server). can i use the ftp stage?

If i use FTP stage will it preserve the file integrity. i am asking this question since in FTP stage input tab we have diffrent options like fixed width column, space b/w columns etc... where i cannot specify as tab as delimeter.

please give your inputs.

Thanks,
Deepak
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

FTP it as one long string field and tell it not to add anything (like quotes) as it transfers the file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote:FTP it as one long string field and tell it not to add anything (like quotes) as it transfers the file. ...
Thanks Chulett. I forgot to add few things earlier.

The file which am doing FTP is concatenation of 3 files.
Header1.txt, Header2.txt and DetailRec.txt and the appended final file name is SEC_dsja_clksal_txt.

The merged file is a tab delimited file. since it has 3 files content in it, i am unable to read it thru Sequential file stage before passing it onto FTP stage. If i use the max no of columns in column tab it is unable to read first header and i cant pass null value also since after end of first header record we cant read null values.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try reading (and transferring) it as one long varchar field. Either that or there's always command line ftp.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote:Try reading (and transferring) it as one long varchar field. Either that or there's always command line ftp. ...
Earlier i also thought of reading as long varchar, but the file should be a tab delimeted at the target server. so if i read it as long varchar as one field i cant format individual values as tab.

since it is design phase i too have suggested them to use UNIX script to ftp the file or i will send the 3 files to target server where they can use cat command to merge 3 files into one file.

please give your thoughts about my opinion.

thanks,
Deepak
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

My assumption was that it is already tab delimited, thus you could send it as a long string and it would preserve those delimiters. Is that not the case? If not, command line ftp won't help at all.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote:My assumption was that it is already tab delimited, thus you could send it as a long string and it would preserve those delimiters. Is that not the case? If not, command line ftp won't h ...
Thanks Chulett. Since the job is monthly run the file might have huge records what is the length we can specify in the seq file stage
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The largest value it could be, meaning the length of the longest record type.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

[quote="chulett"]The largest value it could be, meaning the length of the longest record type. ...[/qu

Thanks Chulett, I got it now.

But in log am getting like this: "FTP_Plug_in_4,0: Info: try.FTP_Plug_in_4: 'RECV' call failed, error number = [11]
Info: try.FTP_Plug_in_4: unable to get response from the FTP server after sending the command QUIT"

this is just an "info" job is working fine.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

More of an ftp problem than a DataStage one, it seems. Is it consistent?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote:More of an ftp problem than a DataStage one, it seems. Is it consistent? ...
Yes i am getting this message for every run
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you shown the error message to whomever is the Admin for that server? Asked for their help?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply