External Source Stage with Multiple XML

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
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

External Source Stage with Multiple XML

Post by dspradeep »

Hi,

Actually I am having 1000 xml in one folder and i need to process this all xml and load it into oracle db.

I have developed the job like below

RowGen -->Trans ---> XML Input ---> Oracle

in Sequencer, I am using ls -m command to take all the file with comma seperator and doing loop to load it into DB but I heared if i use External source stage then i put <code> ls *.xml </code> then datastage concate all the xml file and do the process at same time. is it TRUE?

I am suspecting because every XML have starting with some unwanted tags (ie) Namespace info as well if it concate then it may be wrong.

Please suggest me for moving to next step.

One more request from your guys,

any body having external source stage exact syntax for windows pls give me bcz i tried lot but not working.



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

Post by chulett »

Not true. No 'concatenation' will occur but it will process all of the files one after the other without that pesky looping job sequencer. :wink:

For DOS, you want to look into dir with the /b option but you're better off sticking with UNIX commands.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post by dspradeep »

ok thanks then i can go for my previous design itself.

you mentioned that <code> dir with /b </code> but i am not getting exactly. can u pls post exact syndex

thanks for your quick replay
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

"dir" is a DOS command similar to "ls" in UNIX and the /b means "bare format". Open a "cmd" window and type "dir /?" for the syntax. Or google.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post by dspradeep »

sry for asking that silly question ...

i undertood after that ... I have used the command in ESS like below

<code> dir /folder1/file1.xml /b
</code>

but i am getting this below error
External_Source_0,0: Source subproc: dir: not found

pls help me ...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You're certain your DataStage server is on a Windows box? And you're not actually including the "<code>" tags you keep using here, are you? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Use "ls". "pretend" it's unix.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, because you've always got the MKS Toolkit to fall back on with a Windows server and was part of the reason why I said you'd be better off sticking with UNIX commands. Seems to me it is more problematical getting a fully pathed filename from a dir command which is trivial with ls.

Just surprised it doesn't seem to know what 'dir' is. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Since DIR is an internal command, the only way it could not be found is if the operating system of the server were other than Windows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post by dspradeep »

we are using DS7.5.1 in UNIX box and DS8.1 in Windows box both servers are using for diff project. when i try
<code> ls -t filename </code> command in DS7.5 then i can able to view the file list but the same job in DS8.1 i can't view the file.

But MKSToolkit is installed in my Windows server mechine.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'd need to do a much better job of what "I can't view the file" means for people to help. What happens? What list is generated? Details, man, details!
-craig

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