User-defined qsl query 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
netboyks
Participant
Posts: 20
Joined: Sat Mar 08, 2003 7:43 am

User-defined qsl query file

Post by netboyks »

Has any one used this option in calling an anonymous pl/sql block in an OCI stage.
Thanks.
netboyks
Participant
Posts: 20
Joined: Sat Mar 08, 2003 7:43 am

XML Writer /output Help help - ASAP

Post by netboyks »

Hi there,
We are using DataStage 6.0.1 and I installed xml pack 2.0 and trying to create an xml output. I am facing a problem where there are multiple products for an Invoice and I do not know how to repeat the tags for the products. The outpur records looks like this.

<Invoices>
<Invoice>
<Invoice_Num>1</Invoice_Num>
<Invoice_Dt>2004-02-20</Invoice_Dt>
<Invoice_amt>56789.98</Invoice_amt>
<Invoice_Status>Y</Invoice_status>
-<Products>
<Products>
<Product_Num>12</Product_Num>
<Product_name>ABCS</Product_Name>
<Units>63</Units>
</Product>
</Products>
</Invoice>
<Invoice>
<Invoice_Num>1</Invoice_Num>
<Invoice_Dt>2004-02-20</Invoice_Dt>
<Invoice_amt>56789.98</Invoice_amt>
<Invoice_Status>Y</Invoice_status>
-<Products>
<Products>
<Product_Num>45</Product_Num>
<Product_name>DUEF</Product_Name>
<Units>48</Units>
</Product>
</Products>
</Invoice>
</Invoices>

But I want the output in the following format where the Product is repeating for the same Invoice.

<Invoices>
<Invoice>
<Invoice_Num>1</Invoice_Num>
<Invoice_Dt>2004-02-20</Invoice_Dt>
<Invoice_amt>56789.98</Invoice_amt>
<Invoice_Status>Y</Invoice_status>
-<Products>
<Product>
<Product_Num>12</Product_Num>
<Product_name>ABCS</Product_Name>
<Units>63</Units>
</Product>
<Product>
<Product_Num>45</Product_Num>
<Product_name>DUEF</Product_Name>
<Units>48</Units>
</Product>
</Products>
</Invoice>
</Invoices>


The Invoices and the Products are two hash files in the job which are joined in the transformer and sent out to XML writer stage.
Do I have to pass the output to the Sequential file stage from the XML Writer stage?

Could someone suggest me to get around this problem ASAP please.

Thanks

Netboyks.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
use the search here,
If my memory servs me it was already coverd.
Good Luck,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply