ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL properties

Post new topic  Reply to topic
 DFDL properties « View previous topic :: View next topic » 
Author Message
learnmq2014
PostPosted: Thu May 08, 2014 12:42 pm    Post subject: DFDL properties Reply with quote

Newbie

Joined: 08 May 2014
Posts: 4

I have a message that has 2 TRLs in the file. When the flow picks it up, it processes the message before the 1st TRL and then throws an exception. I do not want to process any messages in the file if it has multiple TRL. Is there any property on DFDL I need to set up.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 08, 2014 1:43 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I do not know what a 'TRL' is.
I do not know what file format you are using.
I do not know what DFDL properties you have experimented with.

It is difficult to give any useful advice at this point - except 'please explain with a lot more detail'.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
learnmq2014
PostPosted: Thu May 08, 2014 2:03 pm    Post subject: Reply with quote

Newbie

Joined: 08 May 2014
Posts: 4

Sample file:
HDR4087381003103916-0408 043517329 05/01/2014111111111111AAAA
DIS1003103916-0408 1003103916A
CRT1003103916-0408
ITM1003103916-0408 048000114781000000001
TRL
HDR7443790666574486-744 010260299 05/05/2014111111111111AAAA
DIS0666574486-744 0666574486T
CRT0666574486-744
ITM0666574486-744 040049436583600000002
TRL

Each message starts with HDR and DIS, CRT, ITM are part of the message. TRL is the delimiter that is used. But when the source application sends 2 TRLs in a file. After the 1st message is being processed. Only then a parser exception is taking place. Instead I want none of the msgs to be processed when there are 2 TRLs in the file.

I am using Length Kind: Implicit
Delimiters Terminator as : TRL%WSP*;
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 08, 2014 2:29 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks - that is a little clearer.

I assume that you are using a FileInput node, with 'Parsed Record Sequence' as the setting. So the first TRL record is being propagated and then the second one is producing an error. Is that correct?

I still do not understand why the second record produces a parsing error ( and you have not quoted the error, so I can't make a guess ).

It is probably not my business to ask, but why do you want to reject a file that contains two TRLs? It sounds like a reasonable thing to do, and IIB can easily process such a file.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
learnmq2014
PostPosted: Thu May 08, 2014 3:43 pm    Post subject: Reply with quote

Newbie

Joined: 08 May 2014
Posts: 4

We are using DFDL. If the messages gets processed after the 1st TRL, I do not have a problem. But it fails. So I have a file that a portion of it is processed and the rest is not. I do not want this scenario, I need the entire file to be processed or the entire file to be failed.

Error:
An error occurred whilst parsing with DFDL;Parameters - CTDP3002E: Unexpected data found at offset '5634' after parsing completed. Data: '0x54...'.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri May 09, 2014 12:02 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You started by saying this:
Quote:
I do not want to process any messages in the file if it has multiple TRL.
But now you are saying this:
Quote:
If the messages gets processed after the 1st TRL, I do not have a problem.


I think I understand what is happening - but you could have made it easier by describing your requirements more carefully!
- Your flow picks up a file
- Your flow parses the file using a DFDL model
- Your DFDL model is incorrect, because it can only handle a single record. So you get an error from DFDL when a second record is encountered.
- Your flow logic is incorrect because you are processing the first record [b]in a way that cannot be rolled back or reversed[b] before you know whether the file is valid.

So you need to do one of the following:
a) Fix your DFDL model so that it can parse multiple records. Or
b) Leave the DFDL model as-is and use Parsed Record Sequence on the FileInput node to process the file one record at a time.

Note that b) will be more efficient in memory usage. But it could make it hard for you to roll back any already-processed TRLs if one of the later TRLs contains an error that trips up the parser.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 09, 2014 4:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

learnmq2014 wrote:

I am using Length Kind: Implicit
Delimiters Terminator as : TRL%WSP*;

DFDL is right to raise an error your Terminator is wrong.
It should read: TRL%WSP*;%NL;
This way the next part is HDR...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
learnmq2014
PostPosted: Fri May 09, 2014 12:17 pm    Post subject: Reply with quote

Newbie

Joined: 08 May 2014
Posts: 4

Thanks All!!

I will be more careful in describing my requirements from now on.

Used "TRL%WSP*;%NL;" as the terminator and it helped me.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL properties
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.