UD N - Unsave Document - get key Numbers from file

(04/26/13)

PURPOSE

To find highest key, number of columns, and number of keys used in a document file.   Example.

SEE ALSO

UD IC [Unsave Document - In-core, Retrieve register values]
UD [Unsave Document]

USAGE

.OPERATION: UD N   [maxkey],[ncols],[nkeys]
[Find info about document file. This operation can return up to 3 optional register variables:
Variable Example Receives
First [maxkey] Maximum key number found
Second [ncols] Number of columns in use
Third [nkeys] Number of keys in use

.DOCUMENT FILE: DOC555
[Enter the name of an existing document file.]

[E.g. let's say the document file has the first 490 keys filled, then skips nine keys, and fills key number 500. The maximum number of columns in the document file is 4. The operation listed above will set [maxkey] to: 500, [ncols] to: 4, and [nkeys] to: 491.

NOTES

  1. This operation can be slow on large doc files.

  2. Works on both file based and incore document files.

SUBROUTINES

RDDOCN, OPENDOC, LUNDOC

CALLER

DRIV3