Hi All,
This is a pretty tough and interesting problem. Im stuck and am quite confused about how to proceed. Any help would be GREATLY appreciated.
I built a map which uses the input type tree as EDI. The type tree consists of ISA, GS, ST, UNA, UNB, UNH , SE, GE, IEA, UNT, UNG and UNZ segments. All of these are optional. Within the UNH and ST, I created something called a dummy segment. It consists of a segment with a segment type and then the data. Reason I did this was that when Mercator receives any data, it will be able to figure out the segment type from the delimiter in the ISA or UNA segments.
The output tree is a flat file which has Interchange details then the data elements within the EDI message. I have 20 data elements identified ex: BL_Number, Container_Number etc. which should take care of all the EDI messages we use.
The map using these type trees takes the EDI file as the input and based on a config file it populates the data eleents using the segment type and the position of the data in that segment. Just used a word function for this.
Problem:
--------
My problem is that I can parse out dat which occurs once using this method. However in case of an 856 message we could have the message organized based on formats like BL then Containers within the BL and then Orders within the containers. The order could be anything.
My question is, is there any way I could parse the data in loops within the EDI using a mercator map. This could be specific to 856's also. I want the map to be able to loop based on a config file and also to know that the data elements are related. Remember: I need the loops to be generic for any message so I cant hardcode the segment types since they would be different for diff messages.
It sounds complex. If you want me to send you the codes so far, let me know and I can send you the generic parser I have so far.
Thanks a lot in advance!
This is a pretty tough and interesting problem. Im stuck and am quite confused about how to proceed. Any help would be GREATLY appreciated.
I built a map which uses the input type tree as EDI. The type tree consists of ISA, GS, ST, UNA, UNB, UNH , SE, GE, IEA, UNT, UNG and UNZ segments. All of these are optional. Within the UNH and ST, I created something called a dummy segment. It consists of a segment with a segment type and then the data. Reason I did this was that when Mercator receives any data, it will be able to figure out the segment type from the delimiter in the ISA or UNA segments.
The output tree is a flat file which has Interchange details then the data elements within the EDI message. I have 20 data elements identified ex: BL_Number, Container_Number etc. which should take care of all the EDI messages we use.
The map using these type trees takes the EDI file as the input and based on a config file it populates the data eleents using the segment type and the position of the data in that segment. Just used a word function for this.
Problem:
--------
My problem is that I can parse out dat which occurs once using this method. However in case of an 856 message we could have the message organized based on formats like BL then Containers within the BL and then Orders within the containers. The order could be anything.
My question is, is there any way I could parse the data in loops within the EDI using a mercator map. This could be specific to 856's also. I want the map to be able to loop based on a config file and also to know that the data elements are related. Remember: I need the loops to be generic for any message so I cant hardcode the segment types since they would be different for diff messages.
It sounds complex. If you want me to send you the codes so far, let me know and I can send you the generic parser I have so far.
Thanks a lot in advance!