DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
junior55
Participant



Joined: 04 Dec 2017
Posts: 1
Location: Albania
Points: 93

Post Posted: Mon Dec 04, 2017 12:11 pm Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Server
OS: Unix
First of hi to all the members here since this is my 1st post.
While learning dstage stuff I have been visiting this site very often and always managed to find the answers I was looking for, except this time Sad.
I hope I am not repetitive in my question as I saw many similar ones but couldn't make it work for my case:

I have the following data in the xml input file that I need to load: ( I am pasting only 1 group of tags...
<?xml version="1.0" encoding="UTF-8" ?>
<envelope>
<invoice>
<POID>0.0.0.1 /bill 36987435346 4</POID>
<INV_PAGE elem="0">
<PAGE_TYPE>VAT INVOICE</PAGE_TYPE>
<CHARGES elem="0">
<VAT_PERCENT>TAX20</VAT_PERCENT>
<NON_USAGE>500</NON_USAGE>
<USAGE>0</USAGE>
<MONTHLY_DISCOUNT>0</MONTHLY_DISCOUNT>
<TOTAL>500</TOTAL>
</CHARGES>
<TAXES elem="0">
<TAX_RATE>TAX20</TAX_RATE>
<TAX>100</TAX>
<TAX_BASE>500</TAX_BASE>
</TAXES>

<CHARGES elem="1">
<VAT_PERCENT>TAXNN</VAT_PERCENT>
<NON_USAGE>0</NON_USAGE>
<USAGE>100</USAGE>
<MONTHLY_DISCOUNT>0</MONTHLY_DISCOUNT>
<TOTAL>100</TOTAL>
</CHARGES>
<TAXES elem="1">
<TAX_RATE>TAXNN</TAX_RATE>
<TAX>0</TAX>
<TAX_BASE>100</TAX_BASE>
</TAXES>
<NET_TOTAL>600</NET_TOTAL>
<TOTAL_AMOUNT>700</TOTAL_AMOUNT>
<TOTAL_AMOUNT_DUE>699.998</TOTAL_AMOUNT_DUE>
</INV_PAGE>
<DELIVERY>paper</DELIVERY>
<PAGE_TYPE>CUSTOMER</PAGE_TYPE>

blablabla
<PAGE_TYPE>SUBSCRIBER</PAGE_TYPE>
blablabla



My job used to run fine until the bolded part was added in the source.
The initial trigger element before the bolded part was added was: /envelope/invoice/INV_PAGE (since INV_PAGE was the lowest level repetitive tag) I used to output different PAGE_TYPE tags in different output links.

What I need now is to get the bolded part from the PAGE_TYPE = VAT INVOICE but I cant make it to produce 2 different lines (with each repetitive tag of the bolded and italic part)
With the old configuration I receive now the following output:

"0.0.0.1 /bill 36987435346 4","TAXNN","0","100","0","100","TAXNN","0","100","600","700","699.998","VAT INVOICE","217054152", (it seems like only TAXNN is being exported and I don't even understand why it is picking elem=1 and not elem=0 for example)

Since the bolded part is added, I decided to play with the trigger element and chose a lower level (CHARGES or TAXES) but in neither case I receive what I want:
What I get as output after changing trigger to /envelope/invoice/TAXES or /envelope/invoice/CHARGES is the following:
What is it:
"0.0.0.1 /bill 36987435346 4","TAX20","500","0","0","500",,,,,,,"VAT INVOICE","217054152",
"0.0.0.1 /bill 36987435346 4","TAXNN","0","100","0","100","TAX20","100","500",,,,"VAT INVOICE","217054152",

While what I need is this :
What i need:
"0.0.0.1 /bill 36987435346 4","TAX20","500","0","0","500",TAX20,100,500,600,700,699.998,"VAT INVOICE","217054152",
"0.0.0.1 /bill 36987435346 4","TAXNN","0","100","0","100","TAXNN","0","100",600,700,699.998,"VAT INVOICE","217054152",

So It looks like after going in a lower level I can produce the 2 rows that I need (although still not correctly as data seems to be merged somehow) but also losing the data of the last 3 tags <NET_TOTAL> , <TOTAL_AMOUNT> and <TOTAL_AMOUNT_DUE>

I hope my question is clear and has enough data. If not please let me know.

Your help Is really welcomed
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42268
Location: Denver, CO
Points: 217033

Post Posted: Mon Dec 04, 2017 12:19 pm Reply with quote    Back to top    

Welcome! Just want to perform a quick sanity check. Wink

Is this truly a 7.x Server job that you are having the issue with?

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3724

Points: 29740

Post Posted: Mon Dec 04, 2017 1:02 pm Reply with quote    Back to top    

Welcome on board! For each output link, you decide which repeating node dictates the number of rows produced. When you have parallel repeating nodes (in this example, quick glance shows taxes a ...

_________________
Ernie Ostic

blogit!
Open IGC is Here!
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours