Page 1 of 1

Processing XML files

Posted: Thu Aug 07, 2008 9:16 am
by mydsworld
If I need to FTP (get) a XML file from remote server and process, how should my job look like :

FTP Ent -> XML Input -> Seq File

Posted: Fri Aug 08, 2008 6:33 am
by eostic
I haven't tried it, but I suspect it "might" work with some documents but fail with others because the FTP stages in DataStage have historically been "streaming" mechanisms. You need to send a "whole" document into XMLInput....if in streaming, the FTP Stage "thinks" it has a single record (if it sees what it things is an end-of-row indicator), it will send it. If that's not the entire file, then XMLInput will fail. Perhaps someone with a lot more experience with the FTP ENterprise Stage can chime in....it's the behavior of that Stage that will have a large impact here.

Ernie

Posted: Fri Aug 08, 2008 4:15 pm
by ray.wurlod
So a two-job solution may be preferable, or a script to do the FTP to a local file that you can then process through the XML Input stage.

Posted: Fri Aug 08, 2008 8:32 pm
by rameshrr3
Use a Before Job Subroutine and call and automated FTP or SCP script to copy to a local folder, then use External Source to cat the file contents to its output link and pass this output link to XML input

Posted: Thu Aug 14, 2008 10:16 am
by mydsworld
I have requirement where Datastage is just needed to FTP a XML file from some source server to target server and do no processing of the XML.

Whats the most efficient way to do this. What should I use in FTP stage metadata. Will it be XSDL definition or just a huge size varchar column ?

Posted: Thu Aug 14, 2008 10:22 am
by chulett
Ugh. Use DataStage to run command line ftp for this... or "just a huge size varchar column".