RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

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
PoorBest 
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.


Ex.

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

   /Free
       
       chain myKeyList myFileRecNm;

Method 2

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


Ex.

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