SET Statement
The SET statement is used to specify a number of runtime options and has the general format:
SET [NO]option [additional parameters];
The option is set on or active by SET option or SET option ON (depending on the option). It is turned off by a corresponding SET NOOPTION or SET option OFF. Additional parameters are required, depending on the option. For syntax details, see the SQL Reference Guide.
Environment Variables Commonly Used with SET
SET statements are executed as part of query language startup procedures at selected levels of scope. A SET statement is entered directly at a terminal for temporary settings or executed using a Actian X environment variable to establish a default option setting for all users. Several levels are shown in the following table:
Example: SET Statement Entered Directly
One or more set options can be specified using the _SET environment Actian X environment variables. They can be assigned directly from the operating system shell. Separate multiple SET statements by semicolons (up to a limit of 256 characters), as shown in the following examples:
Windows:
SET ING_SET=set nojournaling;set printqry
Linux:
ING_SET = "set nojournaling; set printqry" export ING_SET
Example: SET Statements in an Include File
SET statements can also be implemented by means of an INCLUDE statement. The INCLUDE statement allows you to place the SET statements in a file and specify the file name in the setenv (or equivalent) command. Use of the INCLUDE option also avoids the 256-character line limit.
For example:
Windows:
set ING_SET=include c:\extra\ingres\set.ing
Linux:
ING_SET = "include /extra/ingres/set.ing"
export ING_SET
The file set.ing includes the following statements:
set autocommit on;
set lockmode on mastertable
where level = page,
maxlocks = 10;
SET Statements in Startup Files
SET statements are automatically executed as part of query processor start up. Various startup defaults are enabled either by setting a Actian X environment variable (such as ING_SET or II_EMBED_SET described above) or by including these SET statements in one of the query processor startup files.
Last modified date: 11/09/2022