INSERT [FILE=]'file_name' [CD={NO,YES}] [ERROR={CONTINUE,STOP}] [SYNTAX={BATCH,INTERACTIVE}] [ENCODING={LOCALE, 'charset_name'}].
INSERT
is similar to INCLUDE
(see INCLUDE)
but somewhat more flexible.
It causes the command processor to read a file as if it were embedded in the
current command file.
If CD=YES
is specified, then before including the file, the
current directory will be changed to the directory of the included
file.
The default setting is ‘CD=NO’.
Note that this directory will remain current until it is
changed explicitly (with the CD
command, or a subsequent
INSERT
command with the ‘CD=YES’ option).
It will not revert to its original setting even after the included
file is finished processing.
If ERROR=STOP
is specified, errors encountered in the
inserted file will cause processing to immediately cease.
Otherwise processing will continue at the next command.
The default setting is ERROR=CONTINUE
.
If SYNTAX=INTERACTIVE
is specified then the syntax contained in
the included file must conform to interactive syntax
conventions. See Syntax Variants.
The default setting is SYNTAX=BATCH
.
ENCODING
optionally specifies the character set used by the included
file. Its argument, which is not case-sensitive, must be in one of
the following forms:
LOCALE
SET
command (see SET). On GNU/Linux and other Unix-like systems,
environment variables, e.g. LANG or LC_ALL, determine the
system locale.
ASCII
(United States), ISO-8859-1
(western Europe),
EUC-JP
(Japan), and windows-1252
(Windows). Not all
systems support all character sets.
Auto,
encodingwindows-1252
.
For best results, encoding should be an ASCII-compatible
encoding (the most common locale encodings are all ASCII-compatible),
because encodings that are not ASCII compatible cannot be
automatically distinguished from UTF-8.
Auto
Auto,Locale
SET LOCALE
.
When ENCODING is not specified, the default is taken from the
--syntax-encoding command option, if it was specified, and
otherwise it is Auto
.