HOME GUIDE OPERATIONS DOCS FAQ TECHNIQUES FORMATS INSTALL NEW TIPS WEB LINKS Wadsworth Labs

UD FIND - Unsave Document - Find value

(06/02/08)

PURPOSE

Given a specific register column and a desired value retrieves first line from a document file having the desired value in the specified register column. Document files are stored in-core after first use until they are cleared with 'UD FIND E'

SEE ALSO

UD NEXT E [Unsave Document - End]
UD IC [Unsave Document - In Core]

USAGE

.OPERATION: UD FIND [key],[r1],[r2],....

[Where: <key> returns the document file key and [r1],[r2],........ returns up to 100 registers from that line.]

.DOCUMENT FILE: DOC998
[Enter name of the document file.]

.REGISTER COLUMN & VALUE WANTED: 3, 102
[Enter column to be searched and search value.]

[For example with the following document file:

; dat/dat 16-Sep-96 AT 09:52:24 doc007.dat
1 2 22.000 142.00
2 2 101.00 202.00
3 2 102.00 303.33
11 2 111.00 712.00
100 2 112.00 613.00


The following SPIDER procedure:

UD FIND [key],[r1],[r2]
doc002
1,102

VM echo ' ' r1: {****[r1]} r2: {%f8.2%[r2]}

Will give the following output:
R1: 102 R2: 303.00

NOTES

  1. When the end of the file is reached the returned 'key' value is zero.

  2. IMPORTANT: only 12 document files may be accessed concurrently with 'UD IC' or 'UD FIND'. Once the limit is reached one of the current files must be cleared by a 'UD ICE' or 'UD SEL E' command. An attempt to apply 'UD NEXT' to a 13'th document file before execution of a 'UD NEXT E ' command to free the area reserved for data from an existing file will result in an error message.]

SUBROUTINES

UDOCIC, OPENDOC, LUNDOC

CALLER

DRIV3

© Copyright Notice /       Enquiries: spider@wadsworth.org