PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Mixed-direction key not working? - Found problem, corrected  (Read 821 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 296
    • View Profile
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!
« Last Edit: July 28, 2021, 05:43:46 PM by James Zukowski »
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Mixed-direction key not working? - Found problem, corrected
« Reply #1 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?

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

James Zukowski

  • Diamond Member
  • *****
  • Posts: 296
    • View Profile
Re: Mixed-direction key not working? - Found problem, corrected
« Reply #2 on: July 29, 2021, 10:54:31 AM »
I already found the problem and corrected it. Thanks.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services