We will consider an example where there are three sites, numbered 501, 502, and 503. On 20 January 1989 at Site 501, a program with a Task number 1234 generates a data set which is then reprocessed by Task 2452 on 6 October 1990. Meanwhile, at Site 502, a Task number 1234 (which almost certainly denotes a different task than Site 501's Task 1234) also generates a dataset on 7 October 1990. Finally, Site 503 receives the datasets from Site 501 and Site 502 and uses Task number 8364 to incorporate these data into calculations that produce a new dataset on 15 July 1991. We will trace through these datasets using the notation (site code, task code, date, pointer).
The first data sets created at Site 501 and Site 502 had no previous history and therefore contain one node which contains information about the current dataset. The AUDIT.TREE field will contain:
Site 1, dataset 1: (501, 1234, 32528, 0)
Site 2, dataset 1: (502, 1234, 33153, 0)
Note that the 20 January 1989 is 32,528 days after 31 December 1899, while 33,153 days after is 7 October 1990. Also, the pointer fields are set to 0 to indicate that there are no further nodes in the tree.
When Site 501 reprocesses its first dataset, the current audit node will be appended to the audit node from that dataset, and the first audit node will change its pointer from 0 to 1. The new AUDIT.TREE field will contain:
Site 1, dataset:2 (501, 1234, 32528, 1) (501, 2542, 33152, 0)
Finally, when Site 3 takes these two datasets and creates another one, the two AUDIT.TREE nodes from the two datasets are concatenated with a new node for the generated dataset. The NULL pointers will change to point to the newly added node. The final AUDIT.TREE field will contain:
(501, 1234, 32528, 1)
(501, 2542, 33152, 2)
(5032, 1234, 33153, 1)
(503, 8364, 33434, 0)
We can define an algorithm to create new nodes and append them to other nodes as follows:
NN.SITE = site code
NN.TASK = task code
NN.DATE = date (days since 1 Jan 1900)
NN.POINTER = NIL (0)