DOC AND - "And" two Document files

(5/9/05)

PURPOSE

"And" two document files. The output file contains all input lines which occur in both input files. 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 SUBTRACT [Subtract two Document files]

USAGE

.OPERATION: DOC AND

.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 CHECKED (0 IS KEY): 1
[Enter column number which will be ANDed. If the key column (0) is chosen the new document file will contain those keys found in both input files. All other columns will contain the contents of the other columns in the first 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 first file is placed in the output file.]

NOTES

  1. The sort routine sometimes fails on large files which are already perfectly sorted.

SUBROUTINES

DOCS1, OPENDOC, LUNDOC, GETDOCDAT, SORT

CALLER

UTIL4

© Copyright Notice /       Enquiries: spider@wadsworth.org