Posted by Stephen Auerbach on May 04, 2009 at 06:39:21:
In Reply to: Re: Check to see if a record exists in a file posted by Keith Smith on May 01, 2009 at 12:50:28:
This block of code really upset me. I think it was the flag variables; I detest
flag variables. Intensely.
But then the light dawned. IT'S QICBASIC, circa 1980.
exist$="NO" !assume it doesn't exist
Read (n5,1234) key=vnbr$,excp=1000 !position pointer
1000 n5key$=key(5,excp=9000) !get current index
if sub(l5key$,1,5) ne vnbr$, go 1005 !end of vendor??read (n5,1234) key=n5key$,excp=9005 !Get data record
if checkno$ ne HCKNBR$, go 1000 !If no match, next record
if invoice ne HREFNBR$, go 1000 !If no match, next record
if chkdate ne YOURDATE$, GO 1000 !If no match, next recordexist$="YES" !BINGO, I found it!!
1005 BRANCH TO WHERE YOU WANT TO GOPOSITION? Nah
INQUIRE? No way
DO/LOOP? Fugedaboutit
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.