DOC MERGE - Merge two Document files

(12/11/01)

PURPOSE

Merge two document files. If a key is duplicated within a single input file only the final key's registers are used from that file.   Example.

SEE ALSO

SD [Save Document]
DOC COM [Combine series of Document files.]
DOC CREATE [Create Document file]
DOC MIRROR [Mirror a Document file]
DOC SUBTRACT [Subtract two Document files]

USAGE

.OPERATION: DOC MERGE

.INPUT DOCUMENT FILE: DOC001
[Enter name of first input document file.]

.SECOND INPUT DOCUMENT FILE: DOC002
[Enter name of second input document file.]

.OUTPUT DOCUMENT FILE: DOC002
[Enter name of output document file.]

.COLUMN TO BE MERGED BY (0 IS KEY): 1
[Enter column number which will controls merger. If column -1 is chosen the output document file will contain all entries from both of the two files and the keys are renumbered consequtively. The contents of the second file will be listed before the contents of the first file.

If the key column (0) is chosen, the output document file will contain all those keys found in either input file and other columns will contain the contents of the other columns in the input file. If the same key is found in both input files, the contents of the second file's columns will appear in the output.

If a column other than the key column is chosen, then the output file contains one newly renumbered key for each unique value found in the chosen merger column. If the same value is found in the chosen merger column of both input files, the contents of the second file's columns will appear in the output and the first files values will be lost.]

NOTES

  1. You can merge two document files with renumbering of keys by using -1 for the merger column. In this case all entries from the two files are kept and renumbered consecutively.

SUBROUTINES

DOCS1, OPENDOC, LUNDOC, GETDOCDAT

CALLER

DRIV1

© Copyright Notice /       Enquiries: spider@wadsworth.org