>One other question, through some comments here and elsewhere, I'm getting 
>the sense that what I'm attempting isn't exactly the best way to translate 
>an >incoming EDI file.  I'm OK with creating a separate table for each 
>segment or whatever, but how would you link each segment to each other?

>For instance, in the input file, there's nothing that says the first QTY 
>segment belongs to the first PTD segment except that it's present before 
>the next PTD >segment.  Is there a way to extract segment information that 
>may not be visible in the actual file?  Something like an ID number that I 
>could create my ideal output >with while keeping DB efficiency in mind?

Basically you will end up assigning "loop numbers" and/or "segment indexes" 
yourself.  Depending on your translation/mapping tools this either pretty 
easy or pretty impossible.

Eg in the 867  if you want to store the info for each Loop QYT  (@ 2/110 in 
its own record/row of table , your row definition will look like

PTD_index INTEGER
Qty_index  INTEGER
<rest of data from QTY and other segments this loop)

where YOU are assigning a sequence number to the ptd_index and qty_index 
columns and storing in those index columns.

You will (must!)  store the same ptd_index in the table/file for the PTD 
segment (and other segments at loop PTD( 2/010 PTD thru 2/050 N1 ) or you'll 
never be able to put Humpty-Dumpty back together again.

Most translator/mapper tools will provide you with "counter" or "index" 
variables you can increment when processing a loop trigger segment, making 
this actually pretty straightforward to do.... once you have designed your 
target outputs with sufficient index (key)  columns.

Once you have this done and assuming RDBMS output,   you could - to simplify 
"Suzy User" reporting with Crystal Reports or similar reporting tools - 
create a VIEW on your output database to make your "flat" database....  you 
just JOIN on those index columns and "it sure looks like *one* record per 
<thing of interest>"


Michael C. Mattias
Tal Systems Inc.
Racine WI
[email protected]









------------------------------------

...
Please use the following Message Identifiers as your subject prefix: <SALES>, 
<JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>

Job postings are welcome, but for job postings or requests for work: <JOBS> IS 
REQUIRED in the subject line as a prefix.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EDI-L/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EDI-L/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to