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 IndexWebSphere Message Broker (ACE) SupportUsing second field as record identifier for CSV MessageSet

Post new topicReply to topic
Using second field as record identifier for CSV MessageSet View previous topic :: View next topic
Author Message
willlko
PostPosted: Thu May 10, 2007 8:39 pm Post subject: Using second field as record identifier for CSV MessageSet Reply with quote

Newbie

Joined: 10 May 2007
Posts: 1
Location: Aus

Hi All,
Regarding: Message Set
Environment: Message Brokers Toolkit for WebSphere Studio - 5.0.8
I have had experience with message sets before. I typically create a Cobal copybook and import by creating a new Message Set Definition File within the project. Typically our flat file have a record indicator in the first field e.g. EDIFACT – UNB UNA … The problem I have with this latest message it is the second field that determines the record structure…. Not the first..
Input File: CSV, comma declaimed with each record ending with “End of Line Character” and “New Line Character” (reference to java for record delimiter “\r\n”);

Example input document:
1234,A, Serial Number, Batch Number, Data
5678,B, Type, Location, Reference
AB12,C, 345/56 Sample Street3, City3, Country3,Other Data3
CD34,B, Type2, Location2, Reference2
AB78,C, 345/56 Sample Street5, City5, Country5,Other Data5
CD78,C, 345/56 Sample Street6, City6, Country6,Other Data6

Input Document Structure Notes:
The second field (of size 1) which contains either A,B or C indicates the record type.
Structure and group represented below (Its not pretty sorry):
A (1)
|---------B (1 or Many)
|---- C (1 or Many)
Structure of Sample document:
A
|---------B (1 or Many)
|--------C (1 or Many)
|---------B (1 or Many)
|--------C (1 or Many)
|--------C (1 or Many)

The issue:
At present I am not sure how to specify in the message set that the first field should be ignored and have the second field indicate the record type and allow it to be read correctly into the message set. This is the first document structure that has the recorded indicator located in the second field rather then the first.

The indented output after a “Reset Content Descriptor should hopefully be translated as displayed below:(Note some tag names are same as sample data for readability)
<Segment_A>
<SerialNumber> Serial Number</SerialNumber>
<BatchNumber> Batch Number</BatchNumber>
<Data> Data</Data>
<Segment_B>
<Type> Type</Type>
<Location> Location</Location>
<Reference> Reference</Reference>
<Segment_C>
<Street> 345/56 Sample Street3</Street>
<City> City3</City>
<Country> Country3</Country>
<Other>Other Data3</Other>
</Segment_C>
</Segment_B>
<Segment_B>
<Type> Type2</Type>
<Location> Location2</Location>
<Reference> Reference2</Reference>
<Segment_C>
<Street> 345/56 Sample Street5</Street>
<City> City5</City>
<Country> Country5</Country>
<Other>Other Data5</Other>
</Segment_C>
<Segment_C>
<Street> 345/56 Sample Street6</Street>
<City> City6</City>
<Country> Country6</Country>
<Other>Other Data6</Other>
</Segment_C>
</Segment_B>
</Segment_A>
Back to top
View user's profile Send private message MSN Messenger
elvis_gn
PostPosted: Thu May 10, 2007 11:23 pm Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi willlko,

Define a main complex type...

In it define a simple and a complex type....

Let the simple type be your first element...

Let the complex type be decided by your determining field...

Regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportUsing second field as record identifier for CSV MessageSet
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.