100 WINDOW 448,192,32,16
110 BORDER 2,4
120 PAPER 7
130 CLS: CLS #0
140 DEFine PROCedure COM(C$)
150  PRINT "*** ";C$
160 END DEFine COM
170 DEFine PROCedure PL
180  PRINT #0;"Press a key."
190  PAUSE
200  CLS #0
210 END DEFine
220 :
230 COM "Find demonstration"
240 PRINT
250 COM "Using GAZET_DBS to do a selection of finds upon."
260 COM "Open GAZET_DBS (READ ONLY!!)."
270 COM "Get SEXTRA string."
280 :
290 OPEN_DIN #3;flp2_GAZET_DBS
300 PRINT \FEXTRA(#3)
310 :
320 DEFine PROCedure rec_dump
330  PRINT
340  PRINT "FOUND(#3)=";FOUND(#3)
350  FOR f_lp=1 TO FLNUM(#3)
360   PRINT FETCH(#3;f_lp)
370  END FOR f_lp
380 END DEFine rec_dump
390 :
400 PRINT: PL
410 COM ""
420 COM "Look for the first record with the continent containing ROPE."
430 COM "Use SEARCH to do the looking."
440 :
450 SEARCH #3;"continent$","C","ROPE"
460 rec_dump
470 :
480 PRINT: PL
490 COM "Find the next occurrence of the previous condition."
500 :
510 SEARCHC #3;"continent$","C","ROPE"
520 rec_dump
530 :
540 PRINT: PL
550 COM "Find the first record with xemb as part of a string."
560 COM "Use FIND which is case independent."
570 :
580 FIND #3;"xemb"
590 rec_dump
600 :
610 PRINT: PL
620 COM "Continue the find, but for xxemb."
630 COM "(Note: current record is set to last record.)"
640 :
650 FINDC #3;"xxemb"
660 rec_dump
670 :
680 PRINT: PL
690 COM "As a variation, find 14 in the first WORD integer field."
700 :
710 FIND #3;1,14
720 rec_dump
730 :
740 PRINT: PL
750 COM "ORDER the language field and find FRENCH in it."
760 COM "Use LOCATE."
770 :
780 ORDER #3;"language$",1
790 LOCATE #3;"FRENCH"
800 rec_dump
810 :
820 PRINT: PL
830 COM "ORDER on two fields, language then capital."
840 COM "then LOCATE FRENCH, PARIS."
850 :
860 ORDER #3;"language$",1;"capital$",-1
870 LOCATE #3;"FRENCH","PARIS"
880 rec_dump
890 :
900 COM "Done."
910 CLOSE_DATA #3
