|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Modeling CSV with optional comments |
« View previous topic :: View next topic » |
Author |
Message
|
j4zzcat |
Posted: Tue May 14, 2013 2:25 am Post subject: Modeling CSV with optional comments |
|
|
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 |
|
 |
kimbert |
Posted: Tue May 14, 2013 2:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Which version of WMB are you using? |
|
Back to top |
|
 |
j4zzcat |
Posted: Tue May 14, 2013 4:38 am Post subject: |
|
|
Newbie
Joined: 14 May 2013 Posts: 2
|
|
Back to top |
|
 |
kimbert |
Posted: Tue May 14, 2013 5:27 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|