Re: Check to see if a record exists in a file


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

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 record

exist$="YES" !BINGO, I found it!!
1005 BRANCH TO WHERE YOU WANT TO GO

POSITION? Nah
INQUIRE? No way
DO/LOOP? Fugedaboutit


Don't be depressed Jim. Some of us appreciate the Comet commands in IB.



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]