During a provenance block, a list is maintained of all the existing NDFs that have had their Data array mapped (either in read or update mode) during the block. Another list is maintained of all the NDFs that have been written (either existing NDFs accessed in update mode or new NDFs) during the block.
When the block ends, the provenance information within each NDF in the second may be modified to include all the NDFs in the first list as parents. Whether or not this occurs is controlled by the AUTOPROV environment variable. If AUTOPROV is set to '1' then the input NDFs are added to the provenance information in the output NDF. If AUTOPROV is set to anything other than '1' then the output provenance is not updated. If AUTOPROV is not set at all, then the output provenance will be updated only if one or more of the input NDFs contains a PROVENANCE extension.
NDG [1ex