BEGIN_INSERT
Begin an insert (add) to a database.

Format
 Begin_insert |to | DATABASE [/Qualifiers ...]
 |for |
 
 This statement provides a multi-statement ADD that initialises the record buffer and allows updating of the record buffer before the END_INSERT adds the record to the database. If the current record for this database has been modified, it is written back to the record stream before any other record operation takes place. If an error occurs during this write-back operation (e.g. duplicate key, etc.), an error is generated for this statement. The record remains current, but is now considered to be unchanged so that the next record operation will not attempt another write-back. See also ABORT_INSERT and END_INSERT.

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.
 /NovalidateDo not validate for duplicate keys when storing into a key field that does not allow duplicates. The END_INSERT will return an error if any.
 /Rtype=nInitialise as record type n (0-255). This is only valid if the FORMAT attribute is set for the database. Refer to the USERBASE DESCRIBE OPTION FLAGS procedure for more information.

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