INSERT IFILE Examples


Example 1:

 

  

WRITE

FILE1,KEY1;VARIABLES...

  

INSERT

FILE2,KEY2

 

Logical file:

FILE2

Key:

KEY2 is a previously defined character string variable.

 

The record and key are written to FILE1, the secondary key (KEY2) is inserted in FILE2.

 

Example 2:

 

  

WRITE

FILE1,KEY1;VARIABLES...

  

INSERT

FILE2

 

Logical file:

FILE2

 

The record and key are written to FILE1, the secondary key (KEY2) is constructed from the record written and inserted in FILE2.

 



PL/B Language Reference INIT Examples INSERT AFILE Example