NDG_UNHASHPROV

Clear the hash code describing the creation of the Provenance

Description:

Each ancestor in a Provenance structure may contain a copy of the History information stored in the associated ancestor NDF. Storing the complete History component from each ancestor NDF would be very wastefull since the NDF History component will usually contain not only records of operations performed on the ancestor NDF, but also all History records inherited from the "primary" NDF (i.e. the NDF from which the ancestor was propagated). Since these inherited History records will already be stored with other ancestors in the Provenance structure, it is not necessary to store them again. However, this means that when we add a new parent into a Provenance structure using NDG_PUTPROV, NDG needs some way of knowing which records within the new NDF are unique to the NDF (and should thus be stored in the Provenance structure), and which were inherited from earlier ancestors (and will thus already be stored in the Provenance structure). The solution is for each PROVENANCE extension to include a "creator" hash code for the History record that describes the creation of the NDF. When an NDF is supplied to NDG_PUTPROV, each History record, starting with the most recent, is copied from the NDF into the Provenance structure, until a History record is found which has a hash code equal to the creator hash code in the NDF. The copying of history records then stops since all earlier history records will already be present in the Provenance structure.

This routine clears the creator hash code in the supplied Provenance structure, so that a new one will be calculated when the Provenance structure is written to an NDF using NDG_WRITEPROV. This is useful for instance if the Provenance was written to the NDF using NDG_WRITEPROV before the NDF History record was completed. In this case, you would probably want to re-read the Provenance from the NDF, use this function to clear the creator hash code, and then re-write the Provenance to the NDF, thus forcing a new creator hash code to be stored in the NDF.

Invocation

CALL NDG_UNHASHPROV( IPROV, STATUS )

Arguments

IPROV = INTEGER (Given)
An identifier for a structure holding the provenance information read from an NDF, as returned by NDG_READPROV.
STATUS = INTEGER (Given and Returned)
The global status.