END_INSERT
End an insert (add) to a database.
See also BEGIN_INSERT, ABORT_INSERT.

Format
 End_insert|to | DATABASE [/Qualifiers ...]
 |for|

Qualifiers
/Fail=LABELLabel to which to branch if the statement fails.
If LABEL is %EXIT, exit the routine or loop.
If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /Succeed=LABELLabel to which to branch if the statement succeeds.
If LABEL is %EXIT, exit the routine or loop. If in a loop, and LABEL is %CONTINUE, continue the loop. If not in a loop, and LABEL is %CONTINUE, an error message displays.
 /NofailDo not signal an error. Instead, set the
internal variable %FAIL.
 /FlushFlush the record stream so that the record is physically on disk.
 /LoadUse the load factor of the RMS datafile if specified.
 /Lock=(lock_options, ... )Use the following lock options to lock the record if it is automatically retrieved (by accessing a field in that record).
 exclusiveLock against all other record streams except READ_REGARDLESS.
 manualRecords remain locked until explicitly unlocked.
 noneRecords are not to be locked.
 nonexistentProceed with the operation even if the record does not exist (RMS relative files only).
 nowaitDo not wait if the record is locked (return an error).
 readLock the record for reading while allowing other record streams to read but not modify (ignored if write also specified).
 read_regardlessRead records even if another record stream has them locked.
 wait=nWait n seconds before returning an error if the record is locked.
 writeLock the record for writing while allowing other record streams to read but not modify.
 /Size=nInitialize the RMS variable length record to a size of n.

Example
 Begin_insert to RMS! Start the add
 Gosub A_PAGE_CONTROL! Fill in the fields
 Menu ADD_NOW_MENU! Find out if add now
 If %ITEM = "ADD" then
 End_insert
 Return! Complete the add and return
 End_if
 Abort_insert to RMS! Abort the add