OPENSCAN
Open a name scan file

Format
 Openscan DATABASE(FIELD) as TAGNAME[/Qualifiers ...]
 DATABASE(FIELDDatabase field to which a scan file is built. Can also be a field expression (i.e. DATABASE(#expr)).
 Besides this method for opening a scan file explicitly, a scan file can also be implicitly opened using a SCAN statement with a "DATABASE(FIELD) for" clause. See SCAN for more information.
 NOTE
 The OPENSCAN and SCAN statements are provided mainly to support UserBase format datafiles. If you are using RMS datafiles, you should not need to use these statements. Use the RMS key structures with generic look-ups instead.

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.
 /WriteOpen the scan file with write access. The default is read access only. IDML keeps scan files updated dynamically when the field is modified (UserBase format datafiles only).

Example
 Openscan PEOPLE(NAME) as PATTERN_TAG /Fail:CANT_FIND /Write