Lorenzo -
I have used the "Look Ahead" command in TLE to successfully do exactly what
you would like to. TLE will consider all of the repeating "record 3" lines
in your file if the Look Ahead is structured correctly.
In your case, I would try the following:
1) Place the Look Ahead commands in record 1
2) Attach the Look Ahead Stop to record 5. If you get unpredictable results,
attach the "stop" to the first non-repeating record (which in your case
would be record 7).
3) While in "Look Ahead", use an "If" statement to test for the proper
record 3 (i.e. record type 3 = "GTL")
4) While in "Look Ahead", create a store field for the Amount field if the
"If" condition is met
5) Once out of "Look Ahead", if the store field exists, use the store field
in your calculation. If it does not exist, you might want to reject the
document.
Hope this helps.....
Alice Raia
EDI Consultant
[EMAIL PROTECTED]
----- Original Message -----
From: "Lorenzo Eads" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 08, 2001 12:05 PM
Subject: TLE 4.1.4 Look Ahead (Workbench) Question
> To: EDI List Serve Subscribers
>
> From List Serve Subscribers
>
> Subject: TLE 4.1.4 Look Ahead (Workbench) Question
>
> I am in the process of updating an outbound 820 document, and would like
to
> use the "look ahead" command; if possible, to enter a value on the BPR
> segment.
> (Keeping in mind, that I use the record types 2, 3 and 4 for other
segments
> (after
> the BPR segment has been written).
>
> The application data file has record identifiers as follows:
>
> 1 - one per employee
> 2 - multiple per employee; 2,2,2, and so on
> 3 ---|
> > can have multiple 3 & 4 records per employee; 3,4,3,4,3,4, and
> so on
> 4----|
> 5 - multiple per employee; 5,5,5, and so on
> 6 - multiple per employee; 6,6,6, and so on
> 7- one per employee
>
> On one of the 3,4 "loops", the record type 3 will have a description of
> "GTL", and
> there is an amount field (on the same record type 3) that I want to use in
> a
> calculation for a data element on the BPR segment (of the outbound 820
> document).
>
> Is it possible to use the "look ahead", against the multiple 3,4 (loops as
> I call them),
> to find the record type 3 with the "GTL" field? In most cases, the GTL
> will be found
> on the last "3,4" loop.
>
> Example of data file:
>
> 1
> 2
> 2
> 2
> 2
> 3
> 4
> 3
> 4
> 3
> 4
> 5
> 5
> 5
> 5
> 6
> 6
> 6
> 6
> 7
>
> Any suggestions?
>
> =======================================================================
> To contact the list owner: mailto:[EMAIL PROTECTED]
> Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/
=======================================================================
To contact the list owner: mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/