REJECT LINK IN XML INPUT STAGE

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
sanjumsm
Premium Member
Premium Member
Posts: 64
Joined: Tue Oct 17, 2006 11:29 pm
Location: Toronto

REJECT LINK IN XML INPUT STAGE

Post by sanjumsm »

I am using XML input stage, not checking XML against XSD,
If XML file is not in proper tag, then it should abort the job and reject message send to reject link.
for that i m checked reject link option.
using following properties
CASE1:
FATAL- warning/info
ERROR-warning/info
WARNING-warning/info


CASE2:
FATAL- reject
ERROR-reject
WARNING-reject

Above both case job is only aborted and not written any thing in reject link(Reject dataset).

Could you please tell me how do i get reject messages from xml input stage in reject dataset?
sanjeev kumar
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post by VCInDSX »

Did you try enabling the "Log reject error" checkbox?
-V
sanjumsm
Premium Member
Premium Member
Posts: 64
Joined: Tue Oct 17, 2006 11:29 pm
Location: Toronto

Post by sanjumsm »

VCInDSX wrote:Did you try enabling the "Log reject error" checkbox?
Yes I tried this option too... But without success.

Following is the warning message...
XML_Output_78,0: Warning: Validate_XML_FileTestSanInvalid2705.xmlSupplierExtract: Xalan fatal error (publicId: , systemId: /isdata/etl/source/reference/frd/xml_FRD_SuppExt.xml, line: 3, column: 1): Unterminated start tag, 'FrdSupplierData'


And the Fatal follows the above warning

APT_CombinedOperatorController,0: Operator terminated abnormally: received signal SIGILL

main_program: APT_PMsectionLeader(2, node2), player 3 - Unexpected exit status 1.
APT_PMsectionLeader(4, node4), player 3 - Unexpected exit status 1.
APT_PMsectionLeader(1, node1), player 4 - Unexpected exit status 1.
APT_PMsectionLeader(3, node3), player 3 - Unexpected exit status 1.


And hence Job is getting aborted and no record is going to the output link.
sanjeev kumar
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post by VCInDSX »

Could you provide a simple representation of your job design please?

E.g....
External Source ==> XMLInput ==> Transformer ...

Your original post says XML Input, but your message log has the stage name as XML_Output_78,0. Is it just a naming convention error or are you working with XML output stage itself?

The "XML Pack Guide" PDF document has some tips on reject links and logging in Chapter-3. That might help you as well.

For splitting the operator level messages into their constituent operator-level messages, set 'APT_DISABLED_COMBINATION' to true
-V
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

Well, the first thing you should do is get well formed XML. Can the XML above be parsed by, say IE? I think not. At the very least the start tag

<FrdSupplierData>

has got to have one of these End tag thingys;

</FrdSupplierData>

I don't think Xalan can do anything with input that is not well-formed except fail.
sanjumsm
Premium Member
Premium Member
Posts: 64
Joined: Tue Oct 17, 2006 11:29 pm
Location: Toronto

Post by sanjumsm »

Hi

For valid XML file the job is working perfect. I have requirement as following.

For invalid XML file (Say header is missing or any tag is missing) I have to store the reason why that file has failed. Or its status say "Invalid" in Dataset. For testing purpose I put XML output stage and give the file name in that stage. But the thing is when job is getting aborted there will not be any record passing through the reject link or output link as shown below. Job design is...

rowGenrator-> transformer---> Xml(Input Stage)-->Transformer->datset
|
Dataset(XML output stage as reject link)
sanjeev kumar
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

Gotcha. I went to the documentation; page 33 of xmLPACK_20_Designer.pdf
Mapping Transformation Errors to DataStage Errors
The XML parser reports three types of conditions: fatal, error, and
warning.
&#56256;&#56452; Fatal errors are thrown when the XML is not well-formed.
FATAL means stop. It doesn't mean write a reject then stop.
The other settings apply when the XML is being validated.

My understanding is that XML can't be validated without it being well-formed.
sanjumsm
Premium Member
Premium Member
Posts: 64
Joined: Tue Oct 17, 2006 11:29 pm
Location: Toronto

Post by sanjumsm »

&#56256;&#56452; Fatal errors are thrown when the XML is not well-formed.[/quote]
FATAL means stop. It doesn't mean write a reject then stop.
The other settings apply when the XML is being validated.

My understanding is that XML can't be validated without it being well-formed.[/quote]


So if a xml file doesnt match with its given xsd then we can not capture the error message as Fatal will stop the job and hence nothing will be written to reject link(dataset in this case)? So, how to catch the message and put it i in say a dataset?
sanjeev kumar
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It's "possible" that you are being impacted by an 8.0 issue with validation. Can't say for sure, but it's worth checking....this is certainly a more interesting one, but by chance do you have an xsd where you can formally check type or length or attribute value validation (for example)? Either way, it's probably worth a support call to your provider. The condition may be more specific and not exactly what you are seeing, but there has been a reported issue with this capability in v8.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
sjfearnside
Premium Member
Premium Member
Posts: 278
Joined: Wed Oct 03, 2007 8:45 am

Post by sjfearnside »

Was there a solution to this issue from the support provider?
shukla_krishna
Premium Member
Premium Member
Posts: 28
Joined: Mon Apr 20, 2009 11:27 pm
Location: san antonio

Did u Get any solution for this

Post by shukla_krishna »

sjfearnside wrote:Was there a solution to this issue from the support provider?
Krishna Shukla
kejuste
Premium Member
Premium Member
Posts: 11
Joined: Wed Jun 01, 2005 11:42 pm
Location: Brisbane, Australia

Post by kejuste »

I Agree with author eostic,

This is my tip for the problem.

please recheck the extract xsd or xml file format.

if you are etl process is same as mine. see below.

folder--->transformer---->XML--->transformer--->any stage.

make sure the Preserve CRLF is marked as "Yes".

Hope this tip help.

cheers,
Kathy Juster
kejuste
Premium Member
Premium Member
Posts: 11
Joined: Wed Jun 01, 2005 11:42 pm
Location: Brisbane, Australia

Post by kejuste »

I Agree with author eostic,

This is my tip for the problem.

please recheck the extract xsd or xml file format.

if you are etl process is same as mine. see below.

folder--->transformer---->XML--->transformer--->any stage.

make sure the Preserve CRLF is marked as "Yes".

Hope this tip help.

cheers,
Kathy Juster
Post Reply