XML all records in same file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

XML all records in same file

Post by knowledge »

Hi,

I have a requirement where I have to process xml file ,
and have job designed which works fine ,

folder stage --> xml input stage --> Seq file stage .
Previously I had seperate file for each record , I mean in one file I have just one patient report record ,

My job works fine ,

Now I have the xml file which has common header and repeating details of many patient in same file , but when I process this xml file through above job it gives me only one record in the seq file ,

Please suggest me ,do I have to change above job or set something in the job which will process one file but gives me all records at the op ,

New file :
<Header>
<D01_01>xx</D01_01>
<D01_03>xx</D01_03>
<D01_04>xx</D01_04>
<D01_07>xx</D01_07>
<Record>
<E01>
<E01_01>-15</E01_01>
<E01_02>-15</E01_02>
</E01>
<E22>
<E22_01>-15</E22_01>
<E22_02>-15</E22_02>
</E22>
</Record>

<Record>
<E01>
<E01_01>15</E01_01>
<E01_02>-15</E01_02>
</E01>
<E22>
<E22_01>-15</E22_01>
<E22_02>-15</E22_02>
</E22>
</Record>


This is example where many records share same header in one file ,

Earlier I had seperate file with header and and data for only one record,

for ex:

<Header>
<D01_01>xx</D01_01>
<D01_03>xx</D01_03>
<D01_04>xx</D01_04>
<D01_07>xx</D01_07>
<Record>
<E01>
<E01_01>-15</E01_01>
<E01_02>-15</E01_02>
</E01>
<E22>
<E22_01>-15</E22_01>
<E22_02>-15</E22_02>
</E22>
</Record>

Please suggest
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: XML all records in same file

Post by sachin1 »

please check for your repeating element and its description(XPATH expression).
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

Post by knowledge »

Hi sachin,
How can I check repeating element , as there are many repeating elements in the same file ,At a time I can only select one repeating element in xml input stage,
can u Please elaborate .......
In my file I will have all repeating tags for different patients
Thanks
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

XML all records in same file(resolved)

Post by knowledge »

[quote="knowledge"]Hi sachin,
How can I check repeating element , as there are many repeating elements in the same file ,At a time I can only select one repeating element in xml input stage,
can u Please elaborate .......
In my file I will have all repeating tags for different patients
Thanks[/quote]

Thanks Sachin ,

I got it , marked one of the element as repeating element and got data for aother elements too ....
Thank you ,
mallikarjuna36
Premium Member
Premium Member
Posts: 12
Joined: Mon Oct 22, 2007 7:58 am

how we can read single row into multile rows using pivot sta

Post by mallikarjuna36 »

Friends,

Could you please help me on solving the below problem

I am having a file coming from MV.

the file contains like

"abs,CAA,CGR.." like this,i want to populate the data by
abs
CAA
CGR like this.

I know we can use pivot stage,But my question is where can we give the job parametrers in the pivot stage.And how we can do this.

Thanks for your time and effort.

Thanks,
Arjun
mallikarjuna36
Premium Member
Premium Member
Posts: 12
Joined: Mon Oct 22, 2007 7:58 am

how we can read single row into multile rows using pivot sta

Post by mallikarjuna36 »

Friends,

Could you please help me on solving the below problem

I am having a file coming from MV.

the file contains like

"abs,CAA,CGR.." like this,i want to populate the data by
abs
CAA
CGR like this.

I know we can use pivot stage,But my question is where can we give the job parametrers in the pivot stage.And how we can do this.

Thanks for your time and effort.

Thanks,
Arjun
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As noted elsewhere, you do NOT hijack threads.

Hijacking a resolved thread on a completely unrelated topic is totally counterproductive - it doesn't help you and it doesn't help future searchers.

There is a button captioned "Post new topic" on the left of the button bar. Use it.

That way we will know a little more about your configuration.

Your question will not be answered in this thread, for the reasons outlined in my second paragraph.
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