299
Examples
The following illustrates use of the SELECT WHERE clause:
0010 SELECT IOL=0100 FROM "VEND_FILE",KNO=1 BEGIN "ABC CO." END "THAT CO." WHERE
0010:CITY$="CLARENDON"
0020 PRINT REC(IOL=0100)
0030 NEXT RECORD
0100 IOLIST VEND$,NAME$,ADDR1$,ADDR2$,CITY$,PROV$,POSTAL$,INV_DT$,INV,
0100:AMT,TERMS,DUE_DT$
0110 PRINT "DONE"; END
In the following example, SELECT KEY is issued to return the key portion of the
record:
SELECT KEY cst_name$,REC=X1$ FROM "cstfile",KNO=1 BEGIN StartName$ END
StartName$+$FF$ WHERE x1.cst_name$<>SkipName$
PRINT x1.cst_name$
NEXT RECORD
This uses the SELECT RECORD directive to return the full record contents:
SELECT RECORD r$ FROM "cstfile",KNO=1 BEGIN "D" END "D"+$7F$
PRINT r$
NEXT RECORD
See Also