Repetetion of tags

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
sateeshbabu
Participant
Posts: 48
Joined: Sat Oct 22, 2005 9:56 am

Repetetion of tags

Post by sateeshbabu »

Hi Friends,

1stjob:We will parse the xml messages with help xmli/pstage by defining the xpath and will load into different target tables.But for some xml messages we will get some tags in source xml.
2ndjob:Will generate required format message.I am facing a problem while generating this message.For each allocation we need to get only one time of Fx1,Fx2 tags but i am getting as like this.

- <Allocations>
- <Allocation>
<FundId>IGF</FundId>
<CustCode>L950</CustCode>
<BaseCurrency>USD</BaseCurrency>
<ClassCode>ALL</ClassCode>
<Amount>10000.01</Amount>
<GlAcctNum>924000120</GlAcctNum>
<DrCrInd>DR</DrCrInd>
- <FXs>
- <FX1>
<FXRate1>.783484</FXRate1>
<FXAmount1>319.09</FXAmount1>
<FXCurrencyFrom1>USD</FXCurrencyFrom1>
<FXCurrencyTo1>EUR</FXCurrencyTo1>
</FX1>
- <FX2>
<FXRate2>.783484</FXRate2>
<FXAmount2>319.09</FXAmount2>
<FXCurrencyFrom2>USD</FXCurrencyFrom2>
<FXCurrencyTo2>EUR</FXCurrencyTo2>
</FX2>
</FXs>
- <FXs>
- <FX1>
<FXRate1>.006726</FXRate1>
<FXAmount1>37169.19</FXAmount1>
<FXCurrencyFrom1>JPY</FXCurrencyFrom1>
<FXCurrencyTo1>EUR</FXCurrencyTo1>
</FX1>
- <FX2>
<FXRate2>.006726</FXRate2>
<FXAmount2>37169.19</FXAmount2>
<FXCurrencyFrom2>JPY</FXCurrencyFrom2>
<FXCurrencyTo2>EUR</FXCurrencyTo2>
</FX2>
</FXs>
Actually we will not get this fxrates in incoming xml we will define the xpaths in second job to get this tags .And the values will be updated in database for fxrates.

Could anybody suggest me what might be the reason.
Thanks in advance.

Regards,
Sateesh.M
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

Can you give the input data in row and cols format and then mentioned what is the output XML you want? It will be helpful.

If in your second job, you want to generate XMLs and there are repitition elements, then you have to create two separate XMLs for this with separate repitition element and then concatenate these two XMLs with thirs XML stage.
Regards,
S. Kirtikumar.
Post Reply