1. mapping one inbound message to multiple output messages: 'one-to-many' behavior
I've seen this one in the postings a lot. I've been helped a lot from
these groups, thought I'd make this info available to pay a little
back...
Let's say you have 1 inbound message and you want to create 3 outbound
messages(one to many scenario). It has been posted in these groups
many times that it can't be done. Well, here are a couple of
scenarios, and how it's done.
Scenario 1:
*Input*
Input file 1:
HEADR,PO123,2001-06-15
LINE,1,10,123-456-PN,123.45
LINE,2,20,789-012-PN,678.90
HEADR,PO124,2001-06-15
LINE,1,10,ABC-DEF-PN,454.32
LINE,2,10,XYZ-123-PN,87.23
*Desired Output*
Output file 1:
HEADR,PO123,2001-06-15
LINE,1,10,123-456-PN,123.45
LINE,2,20,789-012-PN,678.90
Output file 2:
HEADR,PO124,2001-06-15
LINE,1,10,ABC-DEF-PN,454.32
LINE,2,10,XYZ-123-PN,87.23
What was done: nothing, no mapping at all. In the example, the
inbound spec and the outbound spec are the same. BTS recognizes that
there are two messages and creates two files. Cool, native bts
behavior
Scenario 2, the bitch kitty:
*Input*
Input file 1:
HDR,PO123,2001-06-15
LIN,1,10,123-456-PN,123.45
LIN,2,20,789-012-PN,678.90
LIN,3,30,838-003-PN,434.22
*Desired output*
Output file 1:
HDR,PO123,2001-06-15
LIN,1,10,123-456-PN,123.45
Output file 2:
HDR,PO123,2001-06-15
LIN,2,20,789-012-PN,678.90
Output file 3:
HDR,PO123,2001-06-15
LIN,3,30,838-003-PN,434.22
What was done:
1. Change doc spec: Change the header Maximum Occurrences' from 1'
to *'.
2. Create a map, with source and dest specs the same(in this example
instance).
3. Add a looping functoid connecting to the Line1' record at the
source, and the Header' record at the destination, nothing else.
4. Change the channel configuration to use this mapping spec. Also
the messaging port to utilize the same spec as the envelope(in this
example case).
I have used this with multiple record definitions(for the line item
'LIN' in the example) and it works great.
Understand that all the output documents will go through the same
channel. To have each document go to a different endpoint, configure
the aforementioned channel to dump to a hold queue. Create a queue
receive function dynamically routing based on a qualifier in the
document to the appropriate 'endpoint' channel.
Hope this helps
Jerry Volcek
Tengo Software LLC
2. MVP4 motherboard / CD-rom problems
3. Is it possible to unistall/reinstall 'one' logon point?
4. VS3100/38 Mice
5. Backing up over the network using MMC's shared folders snapin?
6. SUN Manuals
7. MS Windows Shares 'going away' in the Network Neighborhood
8. Juegos ATARI 800XL * OFF-TOPIC* 2541105
9. FAX: Clients 'Network access is denied' to the 'Fax on SERVER' queue
10. Is enhanced folder's approver can Inherite from it's parent folder!
11. How do I combine multiple .ipf scripts into one?
12. Combine multiple documents into one file
13. Multiple CAP's, Dist, Logon Points Question