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

UD NEXT - Unsave Document - Next line

(02/27/07)

PURPOSE

Retrieves next line from a document file without reference to its key. Each successive use retrieves another line from the file. Document files are stored in-core after first use until they are cleared with 'UD NEXT E'

SEE ALSO

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

USAGE

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

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

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

[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:

DO
UD NEXT [key],[r1],[r2]
doc002
IF ([key].le.0) EXIT

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

Will give the following output:
R1: 0022 R2: 142.00 R1: 0101 R2: 202.00 R1: 0102 R2: 303.33 R1: 0111 R2: 712.00 R1: 0112 R2: 613.00

NOTES

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

  2. Keys do not have to be successively numbered. Gaps are OK in the key list.

  3. IMPORTANT: only 12 document files may be accessed concurrently with 'UD IC' or 'UD SEL'. 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

BACK TO SPIDER BACK TO WADSWORTH