+ Reply to Thread
Results 1 to 4 of 4

Thread: KLIST and KFLD

  1. #1
    Guest.Visitor Guest

    Default KLIST and KFLD

    In V5R1, you code a composite key using KLIST and KFLD. It's just that those opcodes have to be coded in fixed-form calcs. In V5R2, there are more options available to you. First, you can code the search arguments in the compound key directly in the keyed I/O statement. For example, "chain (arg1: arg2: arg3+17) rec;". Individual search arguments may be any expression, and have to match the corresponding keys in type only. Unlike KLIST's, RPG handles length and format conversion for the list of search arguments. Second, you can define your search arguments as subfields of a data structure and code your I/O operation as "chain %kds(kds) rec;". This is nice if you define the data structure using extname(file:rec:*key), which defines the DS as an externally described data structure with just the key fields of the record as the subfields. The %kds() more closely approximates the klist, but the list of search arguments syntax is the more flexible.

  2. #2
    Guest.Visitor Guest

    Default KLIST and KFLD

    Wow! Thanks, Hans.

  3. #3
    Guest.Visitor Guest

    Default KLIST and KFLD

    on V5R1 free format programming, what would be the replacement for KLIST and KFLD? in other words, how would you define a composite key? thanks again, Maria

  4. #4
    Guest.Visitor Guest

    Default KLIST and KFLD

    thanks again, Hans.

+ Reply to Thread

Similar Threads

  1. TechTip: No KLIST? What Do I Do Now?
    By Guest.Visitor in forum RPG
    Replies: 11
    Last Post: 05-17-2005, 04:34 PM
  2. klist in free form RPG
    By Guest.Visitor in forum RPG
    Replies: 1
    Last Post: 02-12-2002, 11:06 AM
  3. Data type L as a KFLD
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 02-20-2001, 11:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts