|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Generate Exception when missing Field in CSV file |
« View previous topic :: View next topic » |
Author |
Message
|
vedbhat |
Posted: Tue Mar 08, 2005 10:14 pm Post subject: Generate Exception when missing Field in CSV file |
|
|
 Disciple
Joined: 19 Mar 2002 Posts: 186 Location: Singapore
|
Hi All,
We are at WMQI 5.0.4. I have created a TDS message set to parse CSV file which has a structure of
A1,B1,C1,D1....,X1
A2,B2,C2,D2....,X2
A3,B3,C3,D3....,X3
........
AN,BN,CN,DN....,XN
All elements are mandatory. Minimum and Maximum occurance of every element is specified as 1 under the Type.
However, when the Incoming Message has fewer fields than expected number. Messages are still parsed and Missing fields will be set to NULL. Is there any way to generate expection when parsing using Message Set.
Thanks in advance,
Ved _________________ IBM Certified Solutions Expert - MQSeries Workflow
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
martinrydman |
Posted: Wed Mar 09, 2005 1:27 am Post subject: |
|
|
 Centurion
Joined: 30 Jan 2004 Posts: 139 Location: Gothenburg, Sweden
|
Hi,
Have you looked at the Validation tab of the MQInput node? I haven't worked much with validation, but my understanding is that the parameters on this tab is for the purpose you're looking for
/Martin |
|
Back to top |
|
 |
vedbhat |
Posted: Wed Mar 09, 2005 4:27 pm Post subject: |
|
|
 Disciple
Joined: 19 Mar 2002 Posts: 186 Location: Singapore
|
I get input as an XML and one of the tag contains CSV data. This needs to be parsed. In th compute node, I extract the CSV data and pass it through the RCD. So cannot use Input node.
Is there anythign that I can set in the Message Set to reject the message if all fields are not present. _________________ IBM Certified Solutions Expert - MQSeries Workflow
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 09, 2005 5:23 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can also validate at a Compute node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Ramphart |
Posted: Mon Mar 14, 2005 3:34 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
jefflowrey wrote: |
You can also validate at a Compute node. |
I have not worked on V5 yet but should be the same...
The validation on Compute Node really applies to the outgoing messages (V2.1) so it won't work for you. I'd suggest that you add Value Constrainsts to your original incoming XML message set on the CSV fields.
Use a simple data pattern that check that each field exists and that the last field does not contain a comma (which will allow you to catch the situation where extra fields are sent). _________________ Applications Architect |
|
Back to top |
|
 |
JT |
Posted: Mon Mar 14, 2005 6:54 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|