Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

INSERT statement

Syntax: INSERT (lun, format-statement-label) KEY=index [,EXCP=statement-label | NOEXCP]
Discussion: The INSERT statement functions just like a WRITE statement except that an exception 56 (Record Already Exists for INSERT) is encountered if the key index being inserted already exists. INSERT is used only on keyed files.

The index parameter is the value of the key that is being inserted. This can be a string constant or a string variable.

Note: As of Comet version 503.83, the exception reporting for the INSERT statement running in conjunction with the NLM File System is:

  • Internet Basic programs will produce an exception 56
  • Emulated QICBASIC programs will produce an exception 53 (Invalid File Access)
Example:
INSERT (1,1000) KEY=CUSTNUM$,EXCP=9999