INSERT (AFILE)


ANSI

 

The INSERT instruction adds AAM record keys into an alternate key file. It must immediately follow a successful READ, WRITE, or DELETEK instruction.

 

 

[label]

INSERT

{afile}

 

Where:

label

Optional. A Program Execution Label.

afile

Required. A previously defined and opened AFILE variable into which key information is inserted.

Flags Affected: NONE

Note the following:

  1. The INSERT instruction automatically extracts the key data from the last written record.

  2. An INSERT must be performed against each alternate (secondary) AAM file. If not, the alternate AAM key file may be unusable.

  3. Since an AAM WRITE automatically inserts the key into the primary AAM file, this instruction must not be used for files with only one AAM file.

  4. If an I/O instruction is done to the primary file between the WRITE and the INSERT, the INSERT does not work properly.

 

 

See Also: Example Code, WRITE (IFILE), Disk I/O Instructions

 



PL/B Language Reference INSERT INSERT (IFILE)