Page 1 of 1

XML Imput Read Problem

Posted: Tue Jan 29, 2008 3:27 pm
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.

Posted: Tue Jan 29, 2008 4:05 pm
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'?

Posted: Tue Jan 29, 2008 4:12 pm
by dspxlearn
:? :? :? :?
Choose one from the below options to read your XML stuff.
1. Sequential stage
2. External source stage

Posted: Tue Jan 29, 2008 4:17 pm
by reddy
I meant I have tried each of those 2 stages in 2 different jobs.

Posted: Thu Jan 31, 2008 12:16 am
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,

Posted: Tue Feb 19, 2008 2:34 pm
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.

if it is in Server jobs or parallel

Posted: Wed Feb 20, 2008 8:29 am
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

Posted: Wed Feb 20, 2008 4:36 pm
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.