DOC SUBTRACT - Subtract two Document files

(2/13/02)

PURPOSE

'Subtract' two document files. The output file contains all input lines occurring in the first input file which do not have a corresponding value in the specified column of the second input file. All values are converted to integers so this operation is only useful for columns containing integer values!   Example.

SEE ALSO

DOC CREATE [Create Document file]
DOC MERGE [Merge two Document files]
DOC MIRROR [Mirror a Document file]
DOC AND ["And" two Document files]
DOC REN [Renumber Document file keys]

USAGE

.OPERATION: DOC SUBTRACT

.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 SUBTRACTED BY (0 IS KEY): 1
[Enter column number which will controls subtraction. If the key column (0) is chosen the new document file will contain those keys found in first input file and not found in the second input file. All other columns will contain the contents of the other columns in the fist file. If a column other than the key column is specified then the new file will have original keys in the key column. If the same value is found in the specified column of both input files then that line from either file is missing from the output file.]

NOTES

  1. This operation reads all keys into memory when it starts. If a key is repeated within the input doc files, only the last line of values corresponding to that key number is used.

SUBROUTINES

DOCS1, OPENDOC, LUNDOC, GETDOCDAT, SORT

CALLER

DRIV1