I have an Invoice Detail File. The file contains Route&Seq, Cust ID, Block Number, Invoice Number, Product Code, Product Quantity etc.
The keys are ROUTESEQ, CUSTID, BLOCK NUM & INVOICE NUMBER.
I've created a KLIST named FILEKEY.
What I want to do is chain out to a specific invoice in this file and read the product codes.
Will this work:
EVAL X =1
FILEKEY CHAIN WDOINVD
EVAL PRODCODE(X) =OIPRDCD
DOW NOT %EOF
FILEKEY READE WDOINVD
EVAL PRODCODE(X) =OIPRDCD
X ADD 1 X
ENDDO
My thinking is the CHAIN will find the first matched record and the READE will read each matching sequential record. Not sure if that's correct.
Please advise. Thank you
The keys are ROUTESEQ, CUSTID, BLOCK NUM & INVOICE NUMBER.
I've created a KLIST named FILEKEY.
What I want to do is chain out to a specific invoice in this file and read the product codes.
Will this work:
EVAL X =1
FILEKEY CHAIN WDOINVD
EVAL PRODCODE(X) =OIPRDCD
DOW NOT %EOF
FILEKEY READE WDOINVD
EVAL PRODCODE(X) =OIPRDCD
X ADD 1 X
ENDDO
My thinking is the CHAIN will find the first matched record and the READE will read each matching sequential record. Not sure if that's correct.
Please advise. Thank you