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


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

Posted by Grant Foraker on May 01, 2009 at 08:20:18:

In Reply to: Check to see if a record exists in a file posted by JTehonica on May 01, 2009 at 07:07:58:

Since the file says payments I'm presuming that there are only "CP" (payment) records in the file. And, I'm presuming the transactions codes are "standard" (CP, BI, BF, CM, DM etc).

Put the check number in WCKNBR$ and GOSUB DoesCheckExist

DoesCheckExist:
LET EXISTS$ = 'N'
POSITION (N5) KEY = HVNBR$ + HREFNBR$
DCE10:
LET N5KEY$ = KEY(N5, EXCP = DCE80) ! END OF FILE
IF SUB(N5KEY$,1,6) NE HVNBR$ GOTO DCE90 ! END OF VENDOR
IF SUB(N5KEY$,7,12) NE HREFNBR$ GOTO DCE90 ! END OF INVOICE
INQUIRE (N5,1450) KEY = N5KEY$
IF HCKNBR$ NE WCKNBR$ GOTO DCE10 ! GET NEXT RECORD
LET EXIST$ = 'Y'
GOTO DCE90
DCE80:
IF EXCP EQ 2 GOTO DCE90
ERROR
DCE90:
RETURN



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 ]