PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: James Zukowski on July 28, 2021, 05:33:52 PM

Title: Mixed-direction key not working? - Found problem, corrected
Post by: James Zukowski on July 28, 2021, 05:33:52 PM
I've got a file with a secondary key of:
PO_Date/d + PO_Num + Cust + ShipTo + Seq

I can read directly through the file with no problems. But if I want to grab the first entry in a group and skip the rest of the Seq values, I issue:
read (F,key=PO_Date$:PO_Num$:Cust$:ShipTo$:$FF$)

It always goes to the end of file at this point. The file is created properly, with the first field descending and the remaining ascending. Am I missing something?

Thanks, all!
Title: Re: Mixed-direction key not working? - Found problem, corrected
Post by: Mike King on July 29, 2021, 10:52:54 AM
Have you tried including the kno= option in the READ to make sure the system is using the correct key?

Title: Re: Mixed-direction key not working? - Found problem, corrected
Post by: James Zukowski on July 29, 2021, 10:54:31 AM
I already found the problem and corrected it. Thanks.