Posted by Keith Smith on May 01, 2009 at 12:50:28:
In Reply to: Re: Check to see if a record exists in a file posted by JTehonica on May 01, 2009 at 07:59:29:
Here's an OLD SCHOOL way of doing this when there was no SQL around and it's not difficult. I'll assume that Vendor # is the primary (1st part) of the key/index. Here goes:
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
OLD SCHOOL IS NOT THAT DIFFICULT, GIVE IT A TRY.
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.