XML Imput Read Problem

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
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

XML Imput Read Problem

Post by reddy »

Hi,

I was trying to read an xml file using sequential file stage and External source stage in a parallel job. I get some errors. I was able to read teh file succesfully in server jobs using folder stage. Can anyone please help me?

I get the following error when I use this string "ls #C:\Datafiles#*.xml | sort" in specific programs property in External source stage. C:\Datafiles is my xml subdirectory path.

main_program: Data set, file set, or file "External_Source_0:DSLink3.v": Non-pipe (or non-virtual data set) with .v in its name

when I use this string "cat /#C:\Datafiles#/cd_catalog.xml", I get the following error.

External_Source_0: When processing argument -sourcelistWhen processing file: cat /#C:\Datafiles#/*.xml is not a valid path name: Invalid hostname: cat /#C.

Can anyone give me the exact syntax that I should be using. Thanks in advance.

Thanks,

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

Post by chulett »

Hold on, what does your job design look like? You should use the External Source stage to replace the Sequential File stage, not use both. :?

Why do you have hash/pound signs in your 'xml subdirectory path'?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Post by dspxlearn »

:? :? :? :?
Choose one from the below options to read your XML stuff.
1. Sequential stage
2. External source stage
Thanks and Regards!!
dspxlearn
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

I meant I have tried each of those 2 stages in 2 different jobs.
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post by VCInDSX »

It will be helpful to understand what your feedback might be for Craig's question about the directory name part of your file name.

Are you trying to have a job parameter for the folder name?

Check out viewtopic.php?t=115830&postdays=0&posto ... ce&start=0 for a detailed discussion on this topic.

Good luck,
-V
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

Hi,

I have used the External Source Stage. I can see that the records passed through to XML Input stage but, all the records are rejected and none of them are processed further. I used a peek stage and got the following error message.

"Peek_5,0: Reject:XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure"

I have used Folder Stage and it worked fine without any errors. Can anyone help me with this. Thank you.

Reddy.
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

if it is in Server jobs or parallel

Post by deesh »

For Server jobs

In file Folder U can mention the values

sort order------------NONE
wild carld-------------filename_*.xml (ex: reddy_*.xml)
preserve CRLF-------Yes
Fully quelified--------N

In XML U can enable the value

Where you need repetition value on that column u can enable yes remaining no on columns


If you r parallel

in external source

where u r enable the path name, where u can give before the path name this unix value and between unix value and file path we need single space 'ls file path'(ex:ls /inbox/reddy.xml)

in xml stage
u can enable URL/path in input and Where you need repetition value on that column u can enable yes remaining no on columns


This is deesh
thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Whether or not U can do this these things is a matter of little importance. U is one of the infrequent posters at this site.

The second person personal pronoun in English is spelled "you", not "u".
The plural present tense form of the verb "to be" is spelled "are", not "r".
DSXchange is not a mobile telecommunications device; please do not use SMS-style abbreviations but, rather, adhere to more professional standards of English usage, as if you were documenting your work.

This makes life easier for those for whom English is not their first language.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply