I have a old Quick screen that employs custom path and find procedures to access an TurboImage CODASYL shallow network database. One of the files used for accessing the record set is a KSAM XL which records reference number / account combinations assign to a specific internal transaction. In essence the situation is that multiple accounts may provide identical reference numbers. We wish to prevent duplicate transaction records for the same reference number and account combination yet permit the same reference number to be associated with different accounts on different transactions. This part works.
The second thing that we wish is to search for all accounts that are using a particular reference number set (using the GENERIC qualifier) from within the data entry screen. What happens at the moment is that only the very first record found in the KSAM file is being returned. We would like to be able to return and step through all qualifying records.
The existing procedural code looks like this:
FILE AP-ITEMS DESIGNER NODELETE CLOSE
. . .
PROCEDURE FIND
BEGIN
IF PATH EQ 1
THEN BEGIN
GET AP-ITEMS VIA VENDOR-REFERENCE OPTIONAL SEQUENTIAL
IF ACCESSOK
THEN GET TRANACCT VIA TRANS-IDENT USING TRANS-IDENT OF AP-ITEMS
END
END
. . .
Is there a way to accomplish this within the FIND procedure?
I don't have any experience of TurboImage / KSAM files, but what strikes me in your code is that it's a designer file. I understand it's an indexed file, but will PH return multiple records from a get on a such a designer file?
Have you tried making AP-ITEMS a primary file?