Tracking outbound data
The TrackOut executable map in the trackout.mms map source file serves two purposes. The TrackOut map validates the outbound data before it is sent out. This map also demonstrates one of the functions of a document control system.
TrackOut has two inputs. The first input card, TMOut, is defined for an ANSI EDI transmission. This data is sent to a trading partner. The second input card, Profile, is your trading partner profile. The Profile input is used as a look-up file to determine which output consumes the control information that is extracted from the outbound data.
There are two output cards, Pending and History. The Pending output is stored in a suspense.txt file, which is appended with document control information about an outbound interchange for a trading partner who is sending you a functional acknowledgment. The History output is stored in a history.txt file, which is appended with document control information about an outbound interchange for a trading partner who is not sending you a functional acknowledgment. New control information is appended to one, not both, of the output files.
From time to time, you need to purge the history.txt file after the control information is archived. As you test the sample data in the following directory:
install_dir\Supplychain_EDI_vn.n.n\wtx\x12\examples\ansi\editoinv\reject\ansi\track
You might want to use the PurgeSuspense and PurgeHistory maps that are in the purge.mms file.
The map rule on the V3020 Set(s) output uses the IF and LOOKUP functions to see whether the partner that is sent an interchange is exchanging acknowledgments with you. If the answer is Y (for yes), and you are sending that partner some data that conforms to ANSI X12 version 3020, the Track3020 map is evaluated, and a resulting set of Pending records is produced. There is a similar rule for the ANSI 2003 version release set of records. You can adapt this map to another version release, if desired.
After you build and run the TrackOut map, the suspense.txt output file contains the tracking information.
The first input file poout.txt is purchase order data to be sent to the trading partner, Ron. Look in the partner.txt file that is used for the second input card, to find Ron's partner identifier, BRADLEY, and the Y value for the Send997 item.
We are sending two purchase orders to Ron, both enclosed in the same functional group. Ron wants an acknowledgment. The document control information is placed in the suspense.txt file. When Ron sends back an acknowledgment, you remove it from the suspense file, and place it in the history.txt file.
The suspense.txt file layout is database-ready. There is one record type in the file. Keys that distinguish the data are in the Key Element of the Record.
The map rules for the History data sets are similar. These map rules are used to evaluate the Track3020 map if the partner to whom the interchange is sent has the value N for the Send997 item in the Profile Table. This method provides a record of what was sent to a trading partner.
The Track3020 map produces a Record for each Transaction contained in the Group that is input to this map. The map rule for the Record(s) component that is shown in the rule bar above identifies the Record3020 map that is used to evaluate each Record. Each Record is the same Key (from the second and third arguments to the Record3020 map) and a unique transaction code and control number (from the first argument to the Record3020 map).
The Record3020 map is referenced in map rules for both Pending and History outputs. The map rule that is shown above produces the value No Acknowledgment Required when evaluated from the History output rules.