[EDI-L Mailing List Archive Home] [Message List] [Reply To This Message]

RE: <tech> X12 input indexing issue in Mercator

From: "Bob Ball" <bball@...>
Date: Tue Dec 2, 2003  7:53 pm
Subject: RE: [EDI-L] <tech> X12 input indexing issue in Mercator
I believe "INDEX($)" passes a numerical value where applied. I've used it to
keep count of how many line numbers I needed to display in the item detail
segments. I believe jm_edi might have been referring to the segment / field
index. I haven't mapped an 860 document, I use the Trading Partner PC 32 RPM
maps for that (we only need to see what the customer is trying to say). But
I have used the indexing process within other segments. This example is from
an 850 type tree / PO map, but it's principle is the same:

=UnitPrice Element:PO1 Segment:LoopPO1 * LOOKUP(CaseQuantity
Field:.:ItemXref ,
ProdServiceID Element[1]:ProdServiceID MComposite:PO1 Segment:LoopPO1
= UPCCode Field:.:ItemXref )

What this says is to take the Unit Price element of the PO1 segment and
multiply it by a case quantity figure I have in a separate external
reference file if the PO107 field (the first data field in the qualifier /
data field grouping) equals the UPC code field in the external data file. In
the same respect, if I have three qualifier / element groupings, I could
refer to each as

ProdServiceID Element[2]:ProdServiceID MComposite:PO1 Segment:LoopPO1
ProdServiceID Element[3]:ProdServiceID MComposite:PO1 Segment:LoopPO1

If we're talking about the grouping itself, you could use "ProdServiceID
Element:ProdServiceID MComposite[3]:PO1 Segment:LoopPO1" which would
indicate the third qualifier / data group.

> Input file contains multiple (unknown number) AMT loops which contain
multiple REF segments as per X12. Need to be able compare a current
> AMT loop's segment data with an immediately next AMT loop's segment data.
If conditions are met, create an output record with data from
> the AT segment of the current AMT loop.

The unknown number is what might make this difficult. I guess you could try
to get it to look at each occurrence of the REF segment but I believe
Mercator is not as forgiving when it comes to looking at immediately
following segments. It's like it has to be able to read the segment data
first then make a decision as to what it's suppose to do. What I've had to
do with something similar, is to first write the data to an external file
regardless of what it is, for example, with a Wal-Mart purchase order, I've
written a GLN number with the accompanying P.O. number (plus some other
applicable data) to an external file. I then go back in with a brand new map
and look up whatever information I've needed referencing the known
information. In some cases, I've written separate applications that can read
all the data into an array and then respond based on the parameters
presented.

It seems to me that jm_edi has experienced the lack of cooperation that
Mercator sometimes has "..(1) INDEXING - Unable to get map rule(s)
to compare segment data from current and next AMT loops." If there was a
standard piece of information contained in the AMT segment, you could test
the REF data based on that information, but you may have already tried that.
You might have to be creatively authoring a few maps trying to get the end
result you are looking for. Wish I had more to offer..... If anything, it
may have confirmed what you might already know.

Bob
-----Original Message-----
From: Michael Mattias [mailto: Sent: Tuesday, December 02, 2003 10:27 AM
To: jm_edi
Subject: Re: [EDI-L] <tech> X12 input indexing issue in Mercator



> A techie question and if the wrong place please refer...
>
> I'm using Mercator to transform an X12 860 ...
>
> Two current types of issues..(1) INDEXING -.... (2) SCOPING -

Try in Yahoo Mercator, I just joined.

You're right, the answer would probably bore the snot out of 'general'
EDI-L members, but in essence....

...without seeing the rules used, I'd guess off the top of my head you are
binding the series object path in one part of the rule
and then referring to that path again later in the rule (a REALLY poorly
documented restriction!).

You should look at passing INDEX($) and the entire series to your
functional map AS WELL AS the specific AMT Loop in which you are
interested. That will give you all the 'scope' you need to work within
that AMT loop and you should not run into binding problems as
long as you do your series functions only in that functional map.

(For non-Mercator types: I told you it would bore the snot out of you,
didn't I?)


Michael Mattias
Tal Systems, Inc.
Racine WI


Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
Please use the following Message Identifiers as your subject prefix:
<SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>
Access the list online at: http://groups.yahoo.com/group/EDI-L


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]




 
EDI to XML Mapping for EDIFACT/X12 Convert EDIFACT/X12 Schemas to XML Schema Legacy Data Conversion Tools Access Relational Data as XML Visual XSLT and XQuery Mapping Tools Simplify EDI Data Integration with Stylus Studio XML Enterprise Suite - Free Download!
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.