|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Detecting parse Exception point in a MRM | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | giorginus80 | 
			  
				|  Posted: Wed Dec 31, 2008 1:41 am    Post subject: Detecting parse Exception point in a MRM |   |  |  
		  |  Centurion
 
 
 Joined: 08 Jul 2008Posts: 124
 Location: Rome, Italy
 
 | 
			  
				| Hi, I have a plain text delimited file, I parse it with the mrm definition with mxsd. I can't find when I have a malformed file, the point where the file is wrong. Another question, when I parse it from BLOB, I use an ESQL node
 
 
   
	| Code: |  
	| DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateContent,
 ValidateValue, ValidateLocalError);
 
 DECLARE creationPtr REFERENCE TO OutputRoot.MRM;
 CREATE LASTCHILD OF creationPtr DOMAIN('MRM')
 PARSE(InputRoot.BLOB.BLOB
 OPTIONS parseOptions
 SET 'SirSet'
 TYPE 'rispostaSir'
 FORMAT 'XML1');
 
 |  
 How can I pass to option to don't validate the mxsd (I need in this point of the flow to don't validate min or max occurences of the fields defined in the mxsd)
 |  |  
		  | Back to top |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Wed Dec 31, 2008 3:12 am    Post subject: Re: Detecting parse Exception point in a MRM |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| giorginus80 wrote: |  
	| Hi, I have a plain text delimited file, I parse it with the mrm definition with mxsd. I can't find when I have a malformed file, the point where the file is wrong. Another question, when I parse it from BLOB, I use an ESQL node
 
 
   
	| Code: |  
	| DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateContent,
 ValidateValue, ValidateLocalError);
 
 DECLARE creationPtr REFERENCE TO OutputRoot.MRM;
 CREATE LASTCHILD OF creationPtr DOMAIN('MRM')
 PARSE(InputRoot.BLOB.BLOB
 OPTIONS parseOptions
 SET 'SirSet'
 TYPE 'rispostaSir'
 FORMAT 'XML1');
 
 |  
 How can I pass to option to don't validate the mxsd (I need in this point of the flow to don't validate min or max occurences of the fields defined in the mxsd)
 |  You say you have a plain text delimited file, yet when you parse from BLOB you declare the format as 'XML1'?  Shouldn't the format be 'TDS1' ?
 
 Have fun
  _________________
 MQ & Broker admin
 |  |  
		  | Back to top |  |  
		  |  |  
		  | giorginus80 | 
			  
				|  Posted: Wed Dec 31, 2008 3:18 am    Post subject: Re: Detecting parse Exception point in a MRM |   |  |  
		  |  Centurion
 
 
 Joined: 08 Jul 2008Posts: 124
 Location: Rome, Italy
 
 | 
			  
				| 
   
	| fjb_saper wrote: |  
	| 
   
	| giorginus80 wrote: |  
	| Hi, I have a plain text delimited file, I parse it with the mrm definition with mxsd. I can't find when I have a malformed file, the point where the file is wrong. Another question, when I parse it from BLOB, I use an ESQL node
 
 
   
	| Code: |  
	| DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateContent,
 ValidateValue, ValidateLocalError);
 
 DECLARE creationPtr REFERENCE TO OutputRoot.MRM;
 CREATE LASTCHILD OF creationPtr DOMAIN('MRM')
 PARSE(InputRoot.BLOB.BLOB
 OPTIONS parseOptions
 SET 'SirSet'
 TYPE 'rispostaSir'
 FORMAT 'XML1');
 
 |  
 How can I pass to option to don't validate the mxsd (I need in this point of the flow to don't validate min or max occurences of the fields defined in the mxsd)
 |  You say you have a plain text delimited file, yet when you parse from BLOB you declare the format as 'XML1'?  Shouldn't the format be 'TDS1' ?
 
 Have fun
  |  Sorry I put wrong code...yes the Format is CSV1, I want to convert it in mrm, it works all good, I just want to detect a possible exception point, if the file is malformed (like unconvertable character on a point and so on) how can I detect the point of Exception? thanks in advance
 |  |  
		  | Back to top |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Wed Dec 31, 2008 3:23 am    Post subject: |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| Map to a trace node and output the exception tree and the message tree.  _________________
 MQ & Broker admin
 |  |  
		  | Back to top |  |  
		  |  |  
		  | giorginus80 | 
			  
				|  Posted: Wed Dec 31, 2008 3:26 am    Post subject: |   |  |  
		  |  Centurion
 
 
 Joined: 08 Jul 2008Posts: 124
 Location: Rome, Italy
 
 | 
			  
				| 
   
	| fjb_saper wrote: |  
	| Map to a trace node and output the exception tree and the message tree.  |  
 ok I try to see if there is in the exception tree the exact point of the error in the file! thanks
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kimbert | 
			  
				|  Posted: Thu Jan 01, 2009 4:09 pm    Post subject: |   |  |  
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| 
  So...you are using MRM TDS, and you have a problem. First step is to take a user trace. If you are on v6.1, it will show you exactly what the TDS parser is doing. On other versions of the product it will still provide the full text of all errors, and the context in which they occurred. 
	| Quote: |  
	| Hi, I have a plain text delimited file, I parse it with the mrm definition with mxsd. I can't find when I have a malformed file, the point where the file is wrong. |  
 
  In that case, you should ask yourself whether you really need validation enabled. It checks things like min/max Occurs, missing fields etc. It also checks MRM value constraints ( same as schema facets ). But you probably don't need min/maxOccurs validation, and you don't want facet validation. Checking for invalid characters will happen even if validation is disabled. 
	| Quote: |  
	| (I need in this point of the flow to don't validate min or max occurences of the fields defined in the mxsd) |  
 
  User Trace. 
	| Quote: |  
	| I just want to detect a possible exception point, if the file is malformed (like unconvertable character on a point and so on) how can I detect the point of Exception? |  |  |  
		  | 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
 
 |  |  |  |