PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Iolist for internal keys  (Read 571 times)


  • Diamond Member
  • *****
  • Posts: 115
    • View Profile
Iolist for internal keys
« on: November 21, 2020, 02:21:32 PM »
Is there a way in 2017 or later to write an IOlist for an internal mulitple field key so that the leading fields are padded with nuls?  LEN & CHR do not seem to have that ability.

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3661
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Iolist for internal keys
« Reply #1 on: November 22, 2020, 10:11:00 PM »
Not certain what you are attempting to do but if what you want is to generate a key for a file knowing the fields then you probably just need to use the KEY function.

For example if you have a  multi-segment key of something like productno, ciientno, and date as key number 3, you can generate a key string with:

k$ = KEY(fileno, kno=3, key=productno$:clientno$:date$)

This will insert any required padding and return you a key based on the values you provided.