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 » Modeling CSV with optional comments

Post new topic  Reply to topic
 Modeling CSV with optional comments « View previous topic :: View next topic » 
Author Message
j4zzcat
PostPosted: Tue May 14, 2013 2:25 am    Post subject: Modeling CSV with optional comments Reply with quote

Newbie

Joined: 14 May 2013
Posts: 2

How do I model a CSV file that has optional comments in it?
The comment lines (start with "#") are optional, and can appear anywhere in the file. I don't use them in my model, and I just want to skip them.

---Example---
# @header
# @ref s61
switch-399441,1,2013-04-01 12:04:59

# Data
# type, source, target, start-timestamp, duration, event
1,X124455113,JPS123,2013-04-01 12:05:01,45,-5
1,X124455113,JPS123,2013-04-01 12:05:02,45,-6
# @ref 8771
1,X124455113,JPS123,2013-04-01 12:05:03,45,-2
--End--
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 14, 2013 2:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Which version of WMB are you using?
Back to top
View user's profile Send private message
j4zzcat
PostPosted: Tue May 14, 2013 4:38 am    Post subject: Reply with quote

Newbie

Joined: 14 May 2013
Posts: 2

v8.0.0.1
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 14, 2013 5:27 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The CSV model that is built automatically by the wizard looks like this:
Code:
CSV_Message
    Line  0..unbounded
        field1
        field2
        ...
        fieldN


You will need this:
Code:
CSV_Message
    Comment [0..unbounded]
    Line  [0..unbounded]
        choice
            Comment [1..1]
            sequence
                field1
                field2
                ...
                fieldN

Where 'Comment' is a reference to a global element with the DFDL initiator set to '#'.
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 » Modeling CSV with optional comments
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.