The Check Point command is used to set a marker during the processing of data or to back out to the point where the marker was set. The two command types—Check Point and Backout Point—are used together to pull out portions of application files or EDI files that are being written. The Check Point command is very useful for testing the mapping process, because it allows you to back out to a specified level based on the errors that you have received.
You may assign up to five different check points at a time at various levels in the mapping process. Since these check points are dynamic, you may continue to reuse them. Each time you either read or write an EDI transaction/message, the program looks at the check points.
When you choose the Check Point command, a Parameters section appears at the bottom of the Rule Command – New/Properties window. In the Parameters section, there are two text boxes: Point Number (1-5) and Command Type.
When you select the up arrow next to the Point Number text box, you can choose either Memory Variable or Constant.
If you choose Memory Variable, the Memory Variable window displays with a list of all currently defined memory variables. You can enter a memory variable in the Point Number text box by double-clicking it or by dragging it from the Memory Variable window and dropping it on the Point Number text box. You can select a memory variable, or you can first add a new one and then select it. The memory variable must contain the value 1, 2, 3, 4, or 5.
If you choose Constant, the Constant Value window displays. Enter 1, 2, 3, 4, or 5 in the Constant text box and select OK. The value is entered in the Point Number text box.
When you select the up arrow next to the Command Type text box, you can choose either Check Point or Backout Point.
Check Point tells the program to save this file location and associate it with the check point number entered in the text box above. When the program encounters a Backout Point associated with this same check point number, the program will revert back to this location in the processing.
Backout Point tells the program to return to the location in the processing associated with the check point number in the text box above. The program rewinds all sequential files to the last Check Point.
The Check Point command works somewhat differently for inbound and outbound processing and for sequential and ODBC files.
For outbound maps:
There are no limitations on how far you can back out a text file.
You can back out only to the previous transaction/message in an ODBC database. Since a commit is performed each time you read a new transaction, you can perform a rollback only to the prior commit.
For all inbound maps:
You can back out only to the previous transaction/message. (Each time ECMap reads an EDI transaction/message, the program looks at the check points. If it finds a check point earlier than the prior transaction/message, it changes the check point so that it points to the prior transaction/message.)
ECMap assumes that the Backout command only takes you back to a check point; never forward. As a result, when you back out to a check point that has other check points that occur after it, the program automatically assigns to those later check points the saved location to which you backed out.