XML Input server job finished with no output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

XML Input server job finished with no output

Post by reachsam11 »

I have a Server job to read XML file and write into sequential file.
The issue is, the job finishes successfully with no output.
Is there any option i need to change in the XMLInput stage?


XML Input file
----------------
<?xml version="1.0"?>
<customers>
<customer id="55000">
<name>Charter Group</name>
<address>
<street>100 Main</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address>
<street>720 Prospect</street>
<city>Framingham</city>
<state>MA</state>
<zip>01701</zip>
</address>
<address>
<street>120 Ridge</street>
<state>MA</state>
<zip>01760</zip>
</address>
</customer>
</customers>


XMAP (In the Description of the column definition)
----------------------------------------------------------
/customers/customer/@id (Note: this is set as the key field)
/customers/customer/name/text()
/customers/customer/address/street/text()
/customers/customer/address/city/text()
/customers/customer/address/state/text()
/customers/customer/address/zip/text()


NAMESPACE Declaration (Loaded from the table definition of the XMAP)
----------------------------
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You seem to have no namespace information in your actual XML so it should be removed from your job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hard to say exactly........some things to look at are:

a) what "exact" release of 8 are you on? Early release 8 had issues with namespaces...there really aren't any here, but who knows, having them in the namespace area might trigger something on those early releases of 8 (most all of those xml issues have been fixed...hopefully you are on 8.1 at least).

b) the XPATH looks good on quick review...but be sure to double check the case...many times it's the xpath that causes 0 rows.

c) the hierarchy...try 1. It's strange that the address elements don't have a containment element (<addresses>, like for customers above it). For a test, create a link that only has the id and the name, with the same repetition element noted.

d) the hierarchy....try 2. Create a link that only has id, name and address. Make the xpath for address just /customers/customer/address/ [NO text()]. Make address the key. See if you get 3 rows. If you do, you can parse them out further downstream.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

Post by reachsam11 »

I removed the namespace declatation and it worked. Thanks!

BTW, the version is 8.0
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

reachsam11 wrote:BTW, the version is 8.0
BTW - update, update, update! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
reachsam11
Participant
Posts: 26
Joined: Wed Mar 17, 2010 11:05 am

Post by reachsam11 »

Issue resolved!
chulett wrote:
reachsam11 wrote:BTW, the version is 8.0
BTW - update, update, update! :wink:
ReachSam
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How?

The convention here is that, when you mark a thread as Resolved, you make a post indicating the means by which it was resolved.

This assists future searchers.
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