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 » Help needed on DFDL - conditional repeating CSV elements

Post new topic  Reply to topic
 Help needed on DFDL - conditional repeating CSV elements « View previous topic :: View next topic » 
Author Message
harish_td
PostPosted: Wed Oct 21, 2015 1:07 pm    Post subject: Help needed on DFDL - conditional repeating CSV elements Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Hello,

I have a use case where CSV data arrives in the following format.

Elements A and B are simple elements. The third element (count) signals how many occurrences there are of the succeeding elements. After all occurrences are presented a CRLF signals the end of the record.

Code:

A1, B1,2, C1, C2
A2,B2,3,C1,C2,C3
A3,B3,1,C1
A4,B4,0


The Occurs Count of the C group is set to Expression and the XPath of the 3rd element. I easily got this to work by extending the CSV sample that ships with the toolkit.

The DFDL parser ignores the CRLF and goes on to the second record. How do I indicate that the CRLF should not be treated as part of the C group?

Thanks
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Wed Oct 21, 2015 7:54 pm    Post subject: Reply with quote

Grand High Poobah

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

Don't make it part of the C group. Make it be the record terminator...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Oct 22, 2015 5:13 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

DFDL also has a "group terminator". But I don't remember what it's actually called (it might simply be group terminator).

Record terminator is better if there won't be any fields after the C group.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
timber
PostPosted: Thu Oct 22, 2015 7:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

In DFDL it's just called a 'terminator' whether it is on a group or an element.

I agree that modelling the line-end character(s) as a terminator is a best way forward.
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 » Help needed on DFDL - conditional repeating CSV elements
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.