RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Using Key List in FREE Format Print E-mail
User Rating: / 5
Written by Chamara Withanachchi   
Using Key List in FREE Format

When you are using /FREE format RPG you have 2 methods to use Key Lists in your coding

Method 1

You can define the Key list somewhere in C form and use it in your CHAIN, READE or what ever.


  C     myKeyList     Klist
  C                   Kfld                    myKFld1
  C                   Kfld                    myKFld2
  C                   Kfld                    myKFld3

       chain myKeyList myFileRecNm;

Method 2

Using key fields in opcode itself. When you are using this you must enclose list of fields in parenthesis.


       chain (myKeyFld1 : myKeyFld2 : myKeyFld3) myFileRecNm;
<Previous   Next>