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 parser issue with fixed length

Post new topic  Reply to topic Goto page Previous  1, 2
 DFDL parser issue with fixed length « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Thu Apr 11, 2013 12:12 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
If i set the 'occursCountKind' on 'body' element to 'fixed' then i should have the MaxOccurs = MinOccurs for that element, which is not possible in my case, as the count of records in the file vary everyday.
You are forgetting an important point. The FileInput node is dividing your message into single records. The DFDL model only needs to describe one record.
Quote:
I don't see 'occursCountKind' property defined for elements.
The 'occursCountKind' property is ignored when minOccurs=maxOccurs=1. The DFDL editor only displays the property when maxOccurs > minOccurs.
Quote:
The blank record is only at the beginning of the file. It is the defined structure now.
Set the 'initiator' property on the 'Rewards' element to "%WSP*;" ( the quotes are for clarity, they are not included in the property value ). This will cause the parser to consume any leading whitespace before parsing any record.
Back to top
View user's profile Send private message
albert940
PostPosted: Mon Apr 15, 2013 9:04 am    Post subject: Reply with quote

Novice

Joined: 02 Apr 2013
Posts: 10



It did work finally after including the '%WSP' and '%LF;' for the REWARDS Element. Thanks a lot kimbert. It ran succesfully at run time too. Thanks again.
Back to top
View user's profile Send private message
mqceries
PostPosted: Fri May 17, 2013 10:13 am    Post subject: Reply with quote

Acolyte

Joined: 02 Dec 2011
Posts: 70

thank you very much for clearly explaining the problem. We had a same issue where we changed the escape sequence to no escape sequence in dfdl. will try these options.
Back to top
View user's profile Send private message
albert940
PostPosted: Wed Jul 24, 2013 11:02 am    Post subject: Reply with quote

Novice

Joined: 02 Apr 2013
Posts: 10

Hi Kimbert,
I am back with a question. The File input node is successfully processing data and routing messages to MQ queue. I have to wire the failure or fault terminal in case of errors. When i tested initially, i didn't wire any fault terminal due to which the file processes successfully. i get an exception, when i wire fault terminal and below is the trace.

Code:

Message received and propagated to 'out' terminal of input node 'AS400ToCIARewardPosting.File Input'.
2013-07-24 11:52:53.548324    10216   UserTrace   BIP6063I: Node 'AS400ToCIARewardPosting.File Input' used parser type ''Properties'' to process the input stream, beginning at offset '0'.
2013-07-24 11:52:53.548364    10216   UserTrace   BIP6064I: Node 'AS400ToCIARewardPosting.File Input' used parser type ''DFDL'' to process the input stream, beginning at offset '0'. The parser type was selected based on value ''DFDL'' from the previous parser.
2013-07-24 11:52:53.548400    10216   UserTrace   BIP2537I: Node 'AS400ToCIARewardPosting.Compute': Executing statement   ''BEGIN ... END;'' at ('.RewardsFromAS400_Compute.Main', '2.2').
2013-07-24 11:52:53.548416    10216   UserTrace   BIP2537I: Node 'AS400ToCIARewardPosting.Compute': Executing statement   ''SET OutputRoot.Properties = InputProperties;'' at ('.RewardsFromAS400_Compute.Main', '5.6').
2013-07-24 11:52:53.548452    10216   UserTrace   BIP2539I: Node '': Evaluating expression ''InputProperties'' at ('.RewardsFromAS400_Compute.Main', '5.34'). This resolved to ''InputProperties''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Properties' Value=NULL''.
2013-07-24 11:52:53.548468    10216   UserTrace   BIP2568I: Node 'AS400ToCIARewardPosting.Compute': Copying sub-tree from ''InputProperties'' to ''OutputRoot.Properties''.
2013-07-24 11:52:53.548496    10216   UserTrace   BIP2537I: Node 'AS400ToCIARewardPosting.Compute': Executing statement   ''DECLARE i INTEGER 1;'' at ('.RewardsFromAS400_Compute.Main', '7.6').
2013-07-24 11:52:53.548520    10216   UserTrace   BIP2537I: Node 'AS400ToCIARewardPosting.Compute': Executing statement   ''SET OutputRoot.XMLNSC.REWARDS.Record.POINTS = InputRoot.DFDL.REWARDS.Record.ACTUAL_POINTS;'' at ('.RewardsFromAS400_Compute.Main', '12.7').
2013-07-24 11:52:53.548548    10216   UserTrace   BIP5841I: ''Offset: 0. Parsing will start from root element 'REWARDS'.''
2013-07-24 11:52:53.548604    10216   UserTrace   BIP5841I: ''Offset: 0. Starting to process element 'REWARDS'.''
2013-07-24 11:52:53.548628    10216   UserTrace   BIP5841I: ''Offset: 0. Found initiator '%WSP;%LF;' for element 'REWARDS'''
2013-07-24 11:52:53.548656    10216   UserTrace   BIP5841I: ''Offset: 2. Starting to process element 'Record'.''
2013-07-24 11:52:53.548680    10216   UserTrace   BIP5841I: ''Offset: 2. Starting to process element 'ACTUAL_POINTS'.''
2013-07-24 11:52:53.548768    10216   UserTrace   BIP5843E: ''Unexpected end of data at byte offset '<MISSING INSERT 0>' while parsing element '<MISSING INSERT 1>'. The parser encountered the end of the data stream or the end of a parent element.''
2013-07-24 11:52:53.548788    10216   UserTrace   BIP5807E: The DFDL parser signalled that a processing error occurred. 
                                       The message from the DFDL parser is: 
                                       'CTDP3000E: Unexpected end of data at byte offset '<MISSING INSERT 0>' while parsing element '<MISSING INSERT 1>'. The parser encountered the end of the data stream or the end of a parent element.'
                                       Processing errors occurred during the parsing a DFDL message.
                                       Review and resolve the problems indicated in the message from the DFDL parser.


Trying to modify DFDL to get rid of this error. Sorry as i didnt notice this earlier and was exited when i saw the happy path. Any help is appreciated.
Back to top
View user's profile Send private message
albert940
PostPosted: Wed Jul 24, 2013 11:08 am    Post subject: Reply with quote

Novice

Joined: 02 Apr 2013
Posts: 10

To further add, i am getting all the records read from file input node and populated in the MQ queue expect for this error message being sent to fault terminal after the final record in the file is processed.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 25, 2013 1:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I think you have some trailing white space after the last record:
Code:
2013-07-24 11:52:53.548628    10216   UserTrace   BIP5841I: ''Offset: 0. Found initiator '%WSP;%LF;' for element 'REWARDS'''
2013-07-24 11:52:53.548656    10216   UserTrace   BIP5841I: ''Offset: 2. Starting to process element 'Record'.''

If the FileInput node had consumed *all* of the file, then it would not attempt to extract another record. So I think
- there are two bytes of white space remaining
- the FileInput node asks the DFDL parser to extract another record
- the DFDL parser is correctly complaining that the two remaining bytes do not make up a complete 'RECORD'.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL parser issue with fixed length
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.