EachBOL functional map

In the EachBOL functional map, the output is a single bill of lading, which is made up of one header record and a series of detail records. Each header record type is defined in the Type Designer with the initiator 01, and each detail record was defined as beginning with the initiator 02.

The header record is made up of ten components, three of which contain repeating patterns of name and address information. The rule for each component selects the necessary element from the appropriate segment from the inbound #204, or assigns a literal.

In the case of the repeating name and address section of the header record, NameSet, the correct occurrence of this loop must be selected to properly populate the user's file with either ShipTo, BillTo, or Consignee name and address data. This has been accomplished by using the IF function to test the
N1 Loop, then calling a functional map to create each component of that Name Set. For example, the rule for NameSet[1] tests the N1 segment for an EntityIDCd Element of CN.

The rules of the three NameSet components reference three different N1 loops: one for Consignee, one for Ship To, and one for Bill To.