ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstsoption.htm

1084 lines
44 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow"/>
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="keywords" content="SET OPTION statement, SET OPTION, SQL statements,
in SET OPTION statement, ALWBLK clause, ALWCPYDTA clause, CLOSQLCSR clause,
CNULRQD clause, COMMIT clause, COMPILEOPT clause, DATFMT clause, DATSEP clause,
DBGVIEW clause, DECMPT clause, DECRESULT clause, DFTRDBCOL clause, DLYPRP clause,
DYNDFTCOL clause, DYNUSRPRF clause, EVENTF clause, LANGID clause, MONITOR clause,
NAMING clause, OPTLOB clause, OUTPUT clause, RDBCNNMTH clause, SQLCA clause,
SQLCURRULE clause, SQLPATH clause, SRTSEQ clause, TGTRLS clause, TIMFMT clause,
TIMSEP clause, USRPRF clause" />
<title>SET OPTION</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="soption"></a>
<h2 id="soption"><a href="rbafzmst02.htm#ToC_1313">SET OPTION</a></h2><a id="idx3152" name="idx3152"></a><a id="idx3153" name="idx3153"></a>
<a name="setoptj"></a>
<p id="setoptj">The SET OPTION statement establishes the processing options
to be used for SQL statements.</p>
<a name="wq1764"></a>
<h3 id="wq1764"><a href="rbafzmst02.htm#ToC_1314">Invocation</a></h3>
<p>This statement can be used in a REXX procedure or embedded in an application
program. If used in a REXX procedure, it is an executable statement. If
embedded in an application program, it is not executable and must precede
any other SQL statements. This statement cannot be dynamically prepared.</p>
<a name="wq1765"></a>
<h3 id="wq1765"><a href="rbafzmst02.htm#ToC_1315">Authorization</a></h3>
<p>None required.</p>
<a name="wq1766"></a>
<h3 id="wq1766"><a href="rbafzmst02.htm#ToC_1316">Syntax</a></h3>
<a href="rbafzmstsoption.htm#synsso"><img src="c.gif" alt="Click to skip syntax diagram" /></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn384.htm"
border="0" /></span><a href="#skipsyn-383"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a> .-,------------------------------------.
V |
>>-SET OPTION----+-ALWBLK =&nbsp;--<span class="italic">alwblk-option</span>---------+-+-------->&lt;
+-ALWCPYDTA =&nbsp;--<span class="italic">alwcpydta-option</span>---+
+-CLOSQLCSR =&nbsp;--<span class="italic">closqlcsr-option</span>---+
+-CNULRQD =&nbsp;--<span class="italic">cnulrqd-option</span>-------+
+-COMPILEOPT =&nbsp;--<span class="italic">compile-option</span>----+
+-COMMIT =&nbsp;--<span class="italic">commit-option</span>---------+
+-DATFMT =&nbsp;--<span class="italic">datfmt-option</span>---------+
+-DATSEP =&nbsp;--<span class="italic">datsep-option</span>---------+
+-DBGVIEW =&nbsp;--<span class="italic">dbgview-option</span>-------+
+-DECMPT =&nbsp;--<span class="italic">decmpt-option</span>---------+
+-DECRESULT =&nbsp;--<span class="italic">decresult-option</span>---+
+-DFTRDBCOL =&nbsp;--<span class="italic">dftrdbcol-option</span>---+
+-DLYPRP =&nbsp;--<span class="italic">dlyprp-option</span>---------+
+-DYNDFTCOL =&nbsp;--<span class="italic">dyndftcol-option</span>---+
+-DYNUSRPRF =&nbsp;--<span class="italic">dynusrprf-option</span>---+
+-EVENTF =&nbsp;--<span class="italic">eventf-option</span>---------+
+-LANGID =&nbsp;--<span class="italic">langid-option</span>---------+
+-<span>MONITOR =&nbsp;</span>--<span><span class="italic">monitor-option</span></span>-------+
+-NAMING =&nbsp;--<span class="italic">naming-option</span>---------+
+-OPTLOB =&nbsp;--<span class="italic">optlob-option</span>---------+
+-OUTPUT =&nbsp;--<span class="italic">output-option</span>---------+
+-RDBCNNMTH =&nbsp;--<span class="italic">rdbcnnmth-option</span>---+
+-SQLCA =&nbsp;--<span class="italic">sqlca-option</span>-----------+
+-SQLCURRULE =&nbsp;--<span class="italic">sqlcurrule-option</span>-+
+-SQLPATH =&nbsp;--<span class="italic">sqlpath-option</span>-------+
+-SRTSEQ =&nbsp;--<span class="italic">srtseq-option</span>---------+
+-TGTRLS =&nbsp;--<span class="italic">tgtrls-option</span>---------+
+-TIMFMT =&nbsp;--<span class="italic">timfmt-option</span>---------+
+-TIMSEP =&nbsp;--<span class="italic">timsep-option</span>---------+
'-USRPRF =&nbsp;--<span class="italic">usrprf-option</span>---------'
</pre>
<a name="skipsyn-383" id="skipsyn-383"></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn385.htm"
border="0" /></span><a href="#skipsyn-384"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a>alwblk-option:
|--+-*READ----+-------------------------------------------------|
+-*NONE----+
'-*ALLREAD-'
alwcpydta-option:
|--+-*YES------+------------------------------------------------|
+-*NO-------+
'-*OPTIMIZE-'
closqlcsr-option:
|--+-*ENDACTGRP-+-----------------------------------------------|
+-*ENDMOD----+
+-*ENDPGM----+
+-*ENDSQL----+
'-*ENDJOB----'
cnulrqd-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
commit-option:
|--+-*CHG--+----------------------------------------------------|
+-*NONE-+
+-*CS---+
+-*ALL--+
'-*RR---'
</pre>
<a name="skipsyn-384" id="skipsyn-384"></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn386.htm"
border="0" /></span><a href="#skipsyn-385"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a>compile-option:
|--+-*NONE-------------------+----------------------------------|
'-<span class="italic">compile-string-constant</span>-'
</pre>
<a name="skipsyn-385" id="skipsyn-385"></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn387.htm"
border="0" /></span><a href="#skipsyn-386"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a>datfmt-option:
|--+-*JOB-+-----------------------------------------------------|
+-*ISO-+
+-*EUR-+
+-*USA-+
+-*JIS-+
+-*MDY-+
+-*DMY-+
+-*YMD-+
'-*JUL-'
datsep-option:
|--+-*JOB----+--------------------------------------------------|
+-*SLASH--+
+-'/'-----+
+-*PERIOD-+
+-'.'-----+
+-*COMMA--+
+-','-----+
+-*DASH---+
+-'-'-----+
+-*BLANK--+
'-' '-----'
decmpt-option:
|--+-*PERIOD-+--------------------------------------------------|
+-*COMMA--+
+-*SYSVAL-+
'-*JOB----'
decresult-option:
.-31------------.
|--(--+-<span class="italic">max-precision</span>-+--+-----------------------------------------------+--)--|
| .-31--------. |
'-,--+-<span class="italic">max-scale</span>-+--+-------------------------+-'
| .-0----------------. |
'-,--+-<span class="italic">min-divide-scale</span>-+-'
dbgview-option:
|--+-*NONE---+--------------------------------------------------|
+-*SOURCE-+
+-*STMT---+
'-*LIST---'
dftrdbcol-option:
|--+-*NONE-------+----------------------------------------------|
'-<span class="italic">schema-name</span>-'
dlyprp-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
dyndftcol-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
dynusrprf-option:
|--+-*OWNER-+---------------------------------------------------|
'-*USER--'
eventf-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
langid-option:
|--+-*JOB--------+----------------------------------------------|
+-*JOBRUN-----+
'-<span class="italic">language-ID</span>-'
</pre>
<a name="skipsyn-386" id="skipsyn-386"></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn388.htm"
border="0" /></span><a href="#skipsyn-387"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a>monitor-option:
|--+-<span>*USER</span>---+--------------------------------------------------|
'-<span>*SYSTEM</span>-'
naming-option:
|--+-*SYS-+-----------------------------------------------------|
'-*SQL-'
optlob-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
output-option:
|--+-*NONE--+---------------------------------------------------|
'-*PRINT-'
rdbcnnmth-option:
|--+-*DUW-+-----------------------------------------------------|
'-*RUW-'
sqlca-option:
|--+-*YES-+-----------------------------------------------------|
'-*NO--'
sqlcurrule-option:
|--+-*DB2-+-----------------------------------------------------|
'-*STD-'
sqlpath-option:
|--+-*LIBL----------------+-------------------------------------|
'-<span class="italic">path-string-constant</span>-'
srtseq-option:
|--+-*JOB---------------------------------+---------------------|
+-*HEX---------------------------------+
+-*JOBRUN------------------------------+
+-*LANGIDUNQ---------------------------+
+-*LANGIDSHR---------------------------+
| .-*LIBL/--------. |
'-+---------------+--<span class="italic">srtseq-table-name</span>-'
+-*CURLIB/------+
'-<span class="italic">library-name/</span>-'
tgtrls-option:
|----VxRxMx-----------------------------------------------------|
timfmt-option:
|--+-*HMS-+-----------------------------------------------------|
+-*ISO-+
+-*EUR-+
+-*USA-+
'-*JIS-'
timsep-option:
|--+-*JOB----+--------------------------------------------------|
+-*COLON--+
+-':'-----+
+-*PERIOD-+
+-'.'-----+
+-*COMMA--+
+-','-----+
+-*BLANK--+
'-' '-----'
usrprf-option:
|--+-*OWNER--+--------------------------------------------------|
+-*USER---+
'-*NAMING-'
</pre>
<a name="skipsyn-387" id="skipsyn-387"></a>
<a name="synsso"></a>
<h3 id="synsso"><a href="rbafzmst02.htm#ToC_1317">Description</a></h3>
<dl class="parml">
<dt class="bold">ALWBLK </dt><a id="idx3154" name="idx3154"></a>
<dd>Specifies whether the database manager can use row blocking and the
extent to which blocking can be used for read-only cursors. This option will
be ignored in REXX.
<dl class="parml">
<dt class="bold">*ALLREAD</dt>
<dd>Rows are blocked for read-only cursors if COMMIT is *NONE or *CHG. All
cursors in a program that are not explicitly able to be updated are opened
for read-only processing even though EXECUTE or EXECUTE IMMEDIATE statements
may be in the program.
<p>Specifying *ALLREAD:</p>
<ul>
<li>Allows row blocking under commitment control level *CHG in addition to
the blocking allowed for *READ.</li>
<li>Can improve the performance of almost all read-only cursors in programs,
but limits queries in the following ways:
<ul>
<li>The Rollback (ROLLBACK) command, a ROLLBACK statement in host
languages, or the ROLLBACK HOLD SQL statement does not reposition a read-only
cursor when:
<ul>
<li>ALWBLK(*ALLREAD) was specified when the program or routine that contains
the cursor was created</li>
<li>ALWBLK(*READ) and ALWCPYDTA(*OPTIMIZE) were specified when the program
or routine that contains the cursor was created</li></ul></li>
<li>Dynamic running of a positioned UPDATE or DELETE statement (for example,
using EXECUTE IMMEDIATE), cannot be used to update a row in a cursor unless
the DECLARE statement for the cursor includes the FOR UPDATE clause.</li></ul></li></ul>
</dd>
<dt class="bold">*NONE</dt>
<dd>Rows are not blocked for retrieval of data for cursors.
<p>Specifying
*NONE:</p>
<ul>
<li>Guarantees that the data retrieved is current.</li>
<li>May reduce the amount of time required to retrieve the first row of data
for a query.</li>
<li>Stops the database manager from retrieving a block of data rows that is
not used by the program when only the first few rows of a query are retrieved
before the query is closed.</li>
<li>Can degrade the overall performance of a query that retrieves a large
number of rows.</li></ul>
</dd>
<dt class="bold">*READ</dt>
<dd>Rows are blocked for read-only retrieval of data for cursors when:
<ul>
<li>*NONE is specified on the COMMIT parameter, which indicates that commitment
control is not used.</li>
<li>The cursor is declared with a FOR READ ONLY clause or there are no dynamic
statements that could run a positioned UPDATE or DELETE statement for the
cursor.</li></ul>
<p>Specifying *READ can improve the overall performance of queries that
meet the above conditions and retrieve a large number of rows.</p>
</dd>
</dl>
</dd>
<dt class="bold">ALWCPYDTA </dt><a id="idx3155" name="idx3155"></a>
<dd>Specifies whether a copy of the data can be used in a SELECT statement.
This option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*OPTIMIZE</dt>
<dd>The system determines whether to use the data retrieved directly from
the database or to use a copy of the data. The decision is based on which
method provides the best performance. If COMMIT is *CHG or *CS and ALWBLK
in not *ALLREAD, or if COMMIT is *ALL or *RR, then a copy of the data is used
only when it is necessary to run a query.
</dd>
<dt class="bold">*YES</dt>
<dd>A copy of the data is used only when necessary.
</dd>
<dt class="bold">*NO</dt>
<dd>A copy of the data is not allowed. If a temporary copy of the data is
required to perform the query, an error message is returned.
</dd>
</dl>
</dd>
<dt class="bold">CLOSQLCSR </dt><a id="idx3156" name="idx3156"></a>
<dd>Specifies when SQL cursors are implicitly closed, SQL prepared statements
are implicitly discarded, and LOCK TABLE locks are released. SQL cursors are
explicitly closed when you issue the CLOSE, COMMIT, or ROLLBACK (without HOLD)
SQL statements. This option will be ignored in REXX. *ENDACTGRP and *ENDMOD
are for use by ILE programs and modules. *ENDPGM, *ENDSQL, and *ENDJOB are
for use by non-ILE programs.
<p>This option is not allowed in an SQL function,
SQL procedure, or SQL trigger.</p>
<dl class="parml">
<dt class="bold">*ENDACTGRP</dt>
<dd>SQL cursors are closed, SQL prepared statements are implicitly discarded,
and LOCK TABLE locks are released when the activation group ends.
</dd>
<dt class="bold">*ENDMOD</dt>
<dd>SQL cursors are closed and SQL prepared statements are implicitly discarded
when the module is exited. LOCK TABLE locks are released when the first SQL
program on the call stack ends.
</dd>
<dt class="bold">*ENDPGM</dt>
<dd>SQL cursors are closed and SQL prepared statements are discarded when
the program ends. LOCK TABLE locks are released when the first SQL program
on the call stack ends.
</dd>
<dt class="bold">*ENDSQL</dt>
<dd>SQL cursors remain open between calls and can be fetched without running
another SQL OPEN. One of the programs higher on the call stack must have run
at least one SQL statement. SQL cursors are closed, SQL prepared statements
are discarded, and LOCK TABLE locks are released when the first SQL program
on the call stack ends. If *ENDSQL is specified for a program that is the
first SQL program called (the first SQL program on the call stack), the program
is treated as if *ENDPGM was specified.
</dd>
<dt class="bold">*ENDJOB</dt>
<dd>SQL cursors remain open between calls and can be fetched without running
another SQL OPEN. The programs higher on the call stack do not need to have
run SQL statements. SQL cursors are left open, SQL prepared statements are
preserved, and LOCK TABLE locks are held when the first SQL program on the
call stack ends. SQL cursors are closed, SQL prepared statements are discarded,
and LOCK TABLE locks are released when the job ends.
</dd>
</dl>
</dd>
<dt class="bold">CNULRQD </dt><a id="idx3157" name="idx3157"></a>
<dd>Specifies whether a NUL-terminator is returned for character and graphic
host variables. This option will only be used for SQL statements in C and
C++ programs.
<p>This option is not allowed in an SQL function, SQL procedure,
or SQL trigger.</p>
<dl class="parml">
<dt class="bold">*YES</dt>
<dd>Output character and graphic host variables always contain the NUL-terminator.
If there is not enough space for the NUL-terminator, the data is truncated
and the NUL-terminator is added. Input character and graphic host variables
require a NUL-terminator.
</dd>
<dt class="bold">*NO</dt>
<dd>For output character and graphic host variables, the NUL-terminator
is not returned when the host variable is exactly the same length as the data.
Input character and graphic host variables do not require a NUL-terminator.
</dd>
</dl>
</dd>
<dt class="bold">COMMIT </dt><a id="idx3158" name="idx3158"></a>
<dd>Specifies the isolation level to be used. In REXX, files that are referred
to in the source are not affected by this option. Only tables, views, and
packages referred to in SQL statements are affected. For more information
about isolation levels, see <a href="rbafzmstisol.htm#isol">Isolation level</a>
<dl class="parml">
<dt class="bold">*CHG</dt>
<dd>Specifies the isolation level of Uncommitted Read.
<p></p>
</dd>
<dt class="bold">*NONE</dt>
<dd>Specifies the isolation level of No Commit. If the DROP SCHEMA statement
is included in a REXX procedure, *NONE must be used.
<p></p>
</dd>
<dt class="bold">*CS</dt>
<dd>Specifies the isolation level of Cursor Stability.
<p></p>
</dd>
<dt class="bold">*ALL</dt>
<dd>Specifies the isolation level of Read Stability.
<p></p>
</dd>
<dt class="bold">*RR</dt>
<dd>Specifies the isolation level of Repeatable Read.
</dd>
</dl>
</dd>
<dt class="bold">COMPILEOPT </dt><a id="idx3159" name="idx3159"></a>
<dd>Specifies additional parameters to be used on the compiler command.
The COMPILEOPT string is added to the compiler command built by the precompiler.
If 'INCDIR(' is anywhere in the string, the precompiler will call the compiler
using the SRCSTMF parameter. The contents of the string is not validated.
The compiler command will issue an error if any parameter is incorrect. Using
any of the keywords that the precompiler passes to the compiler will cause
the compiler command to fail because of duplicate parameters. Refer to the <a href="../rzajp/rzajpkickoff.htm">Embedded SQL Programming</a> information for a list of parameters
that the precompiler generates for the compiler command. This option will
be ignored in REXX.
<p>This option is not allowed in an SQL function,
SQL procedure, or SQL trigger.</p>
<dl class="parml">
<dt class="bold">*NONE</dt>
<dd>No additional parameters will be used on the compiler command.
</dd>
<dt class="bold"><var class="pv">character-string</var></dt>
<dd>A character constant of no more than 5000 characters containing the
compiler options.
</dd>
</dl>
</dd>
<dt class="bold">DATFMT </dt><a id="idx3160" name="idx3160"></a>
<dd>Specifies the format used when accessing date result columns. All output
date fields are returned in the specified format. For input date strings,
the specified value is used to determine whether the date is specified in
a valid format.
<a name="wq1767"></a>
<div class="notetitle" id="wq1767">Note:</div>
<div class="notebody">An input date string that uses the format
*USA, *ISO, *EUR, or *JIS is always valid.</div>
<p></p>
<dl class="parml">
<dt class="bold">*JOB:</dt>
<dd>The format specified for the job is used. Use the Display Job (DSPJOB)
command to determine the current date format for the job.
<p></p>
</dd>
<dt class="bold">*ISO</dt>
<dd>The International Organization for Standardization (ISO) date format
(yyyy-mm-dd) is used.
<p></p>
</dd>
<dt class="bold">*EUR</dt>
<dd>The European date format (dd.mm.yyyy) is used.
<p></p>
</dd>
<dt class="bold">*USA</dt>
<dd>The United States date format (mm/dd/yyyy) is used.
<p></p>
</dd>
<dt class="bold">*JIS</dt>
<dd>The Japanese Industrial Standard date format (yyyy-mm-dd) is used.
<p></p>
</dd>
<dt class="bold">*MDY</dt>
<dd>The date format (mm/dd/yy) is used.
<p></p>
</dd>
<dt class="bold">*DMY</dt>
<dd>The date format (dd/mm/yy) is used.
<p></p>
</dd>
<dt class="bold">*YMD</dt>
<dd>The date format (yy/mm/dd) is used.
<p></p>
</dd>
<dt class="bold">*JUL</dt>
<dd>The Julian date format (yy/ddd) is used.
</dd>
</dl>
</dd>
<dt class="bold">DATSEP </dt><a id="idx3161" name="idx3161"></a>
<dd>Specifies the separator used when accessing date result columns.
<a name="wq1768"></a>
<div class="notetitle" id="wq1768">Note:</div>
<div class="notebody">This parameter applies only when *JOB, *MDY, *DMY, *YMD, or *JUL
is specified on the DATFMT parameter.</div>
<p></p>
<dl class="parml">
<dt class="bold">*JOB</dt>
<dd>The date separator specified for the job is used. Use the Display Job
(DSPJOB) command to determine the current value for the job.
<p></p>
</dd>
<dt class="bold">*SLASH <span class="base">or</span> '/'</dt>
<dd>A slash (/) is used.
<p></p>
</dd>
<dt class="bold">*PERIOD <span class="base">or</span> '.'</dt>
<dd>A period (.) is used.
<p></p>
</dd>
<dt class="bold">*COMMA <span class="base">or</span> ','</dt>
<dd>A comma (,) is used.
<p></p>
</dd>
<dt class="bold">*DASH <span class="base">or</span> '-'</dt>
<dd>A dash (-) is used.
<p></p>
</dd>
<dt class="bold">*BLANK <span class="base">or</span> ' '</dt>
<dd>A blank (&nbsp;) is used.
</dd>
</dl>
</dd>
<dt class="bold">DBGVIEW </dt><a id="idx3162" name="idx3162"></a>
<dd>Specifies whether the object can be debugged by the system
debug facilities and the type of debug information to be provided by the compiler.
The DBGVIEW parameter can only be specified in the body of SQL functions,
procedures, and triggers.
<p> If DEBUG MODE in a CREATE PROCEDURE
or ALTER PROCEDURE statement is specified, a DBGVIEW option in the SET OPTION
statement must not be specified.</p>
<p>The possible choices are: </p>
<dl class="parml">
<dt class="bold">*NONE</dt>
<dd>A debug view will not be generated.
</dd>
<dt class="bold">*SOURCE</dt>
<dd>Allows the compiled module object to be debugged using SQL statement
source. If *SOURCE is specified, the modified source is stored in source file
QSQDSRC in the same schema as the created function, procedure, or trigger.
</dd>
<dt class="bold">*STMT</dt>
<dd>Allows the compiled module object to be debugged using program statement
numbers and symbolic identifiers.
</dd>
<dt class="bold">*LIST</dt>
<dd>Generates the listing view for debugging the compiled module object.
</dd>
</dl>
<p>If DEBUG MODE is not specified, but a DBGVIEW option
in the SET OPTION statement is specified, the procedure cannot be debugged
by the Unified Debugger, but can be debugged by the system debug facilities.
If neither DEBUG MODE nor a DBGVIEW option is specified, the debug mode used
is from the CURRENT DEBUG MODE special register.</p>
</dd>
<dt class="bold">DECMPT </dt><a id="idx3163" name="idx3163"></a>
<dd>Specifies the symbol that you want to represent the decimal point. The
possible choices are:
<dl class="parml">
<dt class="bold">*PERIOD</dt>
<dd>The representation for the decimal point is a period.
</dd>
<dt class="bold">*COMMA</dt>
<dd>The representation for the decimal point is a comma.
</dd>
<dt class="bold">*SYSVAL</dt>
<dd>The representation for the decimal point is the system value (QDECFMT).
</dd>
<dt class="bold">*JOB</dt>
<dd>The representation for the decimal point is the job value (DECFMT).
</dd>
</dl>
</dd>
<dt class="bold">DECRESULT </dt><a id="idx3164" name="idx3164"></a>
<dd>Specifies the maximum precision, maximum scale, and minimum divide scale
that should be used during decimal operations, such as decimal arithmetic.
The specified limits only apply to NUMERIC and DECIMAL data types.
<dl class="parml">
<dt class="bold"><var class="pv">max-precision</var></dt>
<dd>An integer constant that is the maximum precision that should be returned
from decimal operations. The value can be 31 or 63. The default is 31.
</dd>
<dt class="bold"><var class="pv">max-scale</var></dt>
<dd>An integer constant that is the maximum scale that should be returned
from decimal operations. The value can range from 0 to the maximum precision.
The default is 31.
</dd>
<dt class="bold"><var class="pv">min-divide-scale</var></dt>
<dd>An integer constant that is the minimum scale that should be returned
from division operations. The value can range from 0 to the maximum scale.
The default is 0.
</dd>
</dl>
</dd>
<dt class="bold">DFTRDBCOL</dt><a id="idx3165" name="idx3165"></a>
<dd>Specifies the schema name used for the unqualified names of tables,
views, indexes, and SQL packages. This parameter applies only to static SQL
statements. This option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*NONE</dt>
<dd>The naming convention specified on the OPTION precompile parameter or
by the SET OPTION NAMING option will be used.
</dd>
<dt class="bold"><var class="pv">schema-name</var></dt>
<dd>Specify the name of the schema. This value is used instead of the naming
convention specified on the OPTION precompile parameter or by the SET OPTION
NAMING option.
</dd>
</dl>
</dd>
<dt class="bold">DLYPRP </dt><a id="idx3166" name="idx3166"></a>
<dd>Specifies whether the dynamic statement validation for a PREPARE statement
is delayed until an OPEN, EXECUTE, or DESCRIBE statement is run. Delaying
validation improves performance by eliminating redundant validation. This
option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*NO</dt>
<dd>Dynamic statement validation is not delayed. When the dynamic statement
is prepared, the access plan is validated. When the dynamic statement is used
in an OPEN or EXECUTE statement, the access plan is revalidated. Because the
authority or the existence of objects referred to by the dynamic statement
may change, you must still check the SQLCODE or SQLSTATE after issuing the
OPEN or EXECUTE statement to ensure that the dynamic statement is still valid.
</dd>
<dt class="bold">*YES</dt>
<dd>Dynamic statement validation is delayed until the dynamic statement
is used in an OPEN, EXECUTE, or DESCRIBE SQL statement. When the dynamic statement
is used, the validation is completed and an access plan is built. If you specify
*YES, you should check the SQLCODE and SQLSTATE after running an OPEN, EXECUTE,
or DESCRIBE statement to ensure that the dynamic statement is valid.
<a name="wq1769"></a>
<div class="notetitle" id="wq1769">Note:</div>
<div class="notebody">If you specify *YES, performance is not improved if the INTO clause
is used on the PREPARE statement or if a DESCRIBE statement uses the dynamic
statement before an OPEN is issued for the statement.</div>
</dd>
</dl>
</dd>
<dt class="bold">DYNDFTCOL </dt><a id="idx3167" name="idx3167"></a>
<dd>Specifies the schema name specified for the DFTRDBCOL parameter is also
used for dynamic statements. This option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*NO</dt>
<dd>Do not use the value specified for DFTRDBCOL for unqualified names of
tables, views, indexes, and SQL packages for dynamic SQL statements. The naming
convention specified on the OPTION precompile parameter or by the SET OPTION
NAMING option will be used.
</dd>
<dt class="bold">*YES</dt>
<dd>The schema name specified for DFTRDBCOL will be used for the unqualified
names of the tables, views, indexes, and SQL packages in dynamic SQL statements.
</dd>
</dl>
</dd>
<dt class="bold">DYNUSRPRF </dt><a id="idx3168" name="idx3168"></a>
<dd>Specifies the user profile to be used for dynamic SQL statements. This
option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*USER</dt>
<dd>Local dynamic SQL statements are run under the user profile of the job.
Distributed dynamic SQL statements are run under the user profile of the application server job.
</dd>
<dt class="bold">*OWNER</dt>
<dd>Local dynamic SQL statements are run under the user profile of the program's
owner. Distributed dynamic SQL statements are run under the user profile of
the SQL package's owner.
</dd>
</dl>
</dd>
<dt class="bold">EVENTF</dt><a id="idx3169" name="idx3169"></a>
<dd>Specifies whether an event file will be generated. CoOperative Development
Environment/400 (CODE/400) uses the event file to provide error feedback integrated
with the CODE/400 editor.
<dl class="parml">
<dt class="bold">*YES</dt>
<dd>The compiler produces an event file for use by CoOperative Development
Environment/400 (CODE/400).
</dd>
<dt class="bold">*NO</dt>
<dd>The compiler will not produce an event file for use by CoOperative Development
Environment/400 (CODE/400).
</dd>
</dl>
</dd>
<dt class="bold">LANGID </dt><a id="idx3170" name="idx3170"></a>
<dd>Specifies the language identifier to be used when SRTSEQ(*LANGIDUNQ)
or SRTSEQ(*LANGIDSHR) is specified.
<dl class="parml">
<dt class="bold">*JOB <span class="base">or</span> *JOBRUN</dt>
<dd>The LANGID value for the job is used.
<p>For distributed applications,
LANGID(*JOBRUN) is valid only when SRTSEQ(*JOBRUN) is also specified.</p>
<p></p>
</dd>
<dt class="bold"><var class="pv">language-id</var></dt>
<dd>Specify a language identifier to be used. For information on the values
that can be used for the language identifier, see the <a href="../nls/rbagslangcntrycodeids.htm">Language identifier</a> topic in the iSeries Information Center.
</dd>
</dl>
</dd>
<dt class="bold">MONITOR</dt><a id="idx3171" name="idx3171"></a>
<dd>Specifies whether the statements should be identified as user or system
statements when a database monitor is run.
<dl class="parml">
<dt class="bold">*USER</dt>
<dd>The SQL statements are identified as user statements. This is the default.
</dd>
<dt class="bold">*SYSTEM</dt>
<dd>The SQL statements are identified as system statements.
</dd>
</dl>
</dd>
<dt class="bold">NAMING </dt><a id="idx3172" name="idx3172"></a>
<dd>Specifies whether the SQL naming convention or the system naming convention
is to be used. This option is not allowed in an SQL function, SQL procedure,
or SQL trigger.
<p>The possible choices are:</p>
<dl class="parml">
<dt class="bold">*SYS</dt>
<dd>The system naming convention will be used.
</dd>
<dt class="bold">*SQL</dt>
<dd>The SQL naming convention will be used.
</dd>
</dl>
</dd>
<dt class="bold">OPTLOB </dt><a id="idx3173" name="idx3173"></a>
<dd>Specifies whether accesses to LOBs can be optimized when accessing through DRDA&reg;. The possible choices are:
<dl class="parml">
<dt class="bold">*YES</dt>
<dd>LOB accesses should be optimized. The first FETCH for a cursor determines
how the cursor will be used for LOBs on all subsequent FETCHes. This option
remains in effect until the cursor is closed.
<p>If the first FETCH uses a
LOB locator to access a LOB column, no subsequent FETCH for that cursor can
fetch that LOB column into a LOB variable.</p>
<p>If the first FETCH places
the LOB column into a LOB variable, no subsequent FETCH for that cursor can
use a LOB locator for that column.</p>
</dd>
<dt class="bold">*NO</dt>
<dd>LOB accesses should not be optimized. There is no restriction on whether
a column is retrieved into a LOB locator or into a LOB variable. This option
can cause performance to degrade.
</dd>
</dl>
</dd>
<dt class="bold">OUTPUT </dt><a id="idx3174" name="idx3174"></a>
<dd>Specifies whether the precompiler and compiler listings are generated.
The OUTPUT parameter can only be specified in the body of SQL functions,
procedures, and triggers. The possible choices are:
<dl class="parml">
<dt class="bold">*NONE</dt>
<dd>The precompiler and compiler listings are not generated.
</dd>
<dt class="bold">*PRINT</dt>
<dd>The precompiler and compiler listings are generated.
</dd>
</dl>
</dd>
<dt class="bold">RDBCNNMTH </dt><a id="idx3175" name="idx3175"></a>
<dd>Specifies the semantics used for CONNECT statements. This option will
be ignored in REXX.
<dl class="parml">
<dt class="bold">*DUW</dt>
<dd>CONNECT (Type 2) semantics are used to support distributed unit of work.
Consecutive CONNECT statements to additional relational databases do not result
in disconnection of previous connections.
</dd>
<dt class="bold">*RUW</dt>
<dd>CONNECT (Type 1) semantics are used to support remote unit of work.
Consecutive CONNECT statements result in the previous connection being disconnected
before a new connection is established.
</dd>
</dl>
</dd>
<dt class="bold">SQLCA </dt><a id="idx3176" name="idx3176"></a>
<dd>Specifies whether the fields in an SQLCA will be set after
each SQL statement. The SQLCA option is only allowed for ILE C, ILE C++, ILE
COBOL, and ILE RPG. This option is not allowed in an SQL function, SQL procedure,
or SQL trigger.
<p>The possible choices are:</p>
<dl class="parml">
<dt class="bold">*YES</dt>
<dd>The fields in an SQLCA will be set after each SQL statement. The user
program can reference all the values in the SQLCA following the execution
of an SQL statement.
</dd>
<dt class="bold">*NO</dt>
<dd>The fields in an SQLCA will not be set after each SQL statement. The
user program should use the GET DIAGNOSTICS statement to retrieve information
about the execution of the SQL statement.
<p>SQLCA(*NO) will typically perform
better than SQLCA(*YES).</p>
</dd>
</dl>
<p>In other host languages, an SQLCA is required and fields in the
SQLCA will be set after each SQL statement.</p>
</dd>
<dt class="bold">SQLCURRULE </dt><a id="idx3177" name="idx3177"></a>
<dd>Specifies the semantics used for SQL statements.
<dl class="parml">
<dt class="bold">*DB2</dt>
<dd>The semantics of all SQL statements will default to the rules established
for DB2&reg;. The following semantics are controlled by this option:
<ul>
<li>Hexadecimal constants are treated as character data.</li></ul>
</dd>
<dt class="bold">*STD</dt>
<dd>The semantics of all SQL statements will default to the rules established
by the ISO and ANSI SQL standards. The following semantics are controlled
by this option:
<ul>
<li>Hexadecimal constants are treated as binary data.</li></ul>
</dd>
</dl>
</dd>
<dt class="bold">SQLPATH </dt><a id="idx3178" name="idx3178"></a>
<dd>Specifies the path to be used to find procedures, functions, and user
defined types in static SQL statements. This option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*LIBL</dt>
<dd>The path used is the library list at runtime.
</dd>
<dt class="bold"><var class="pv">character-string</var></dt>
<dd>A character constant with one or more schema names that are separated
by commas.
</dd>
</dl>
</dd>
<dt class="bold">SRTSEQ </dt><a id="idx3179" name="idx3179"></a>
<dd>Specifies the sort sequence table to be used for string comparisons
in SQL statements.
<a name="wq1770"></a>
<div class="notetitle" id="wq1770">Note:</div>
<div class="notebody">*HEX must be specified if a REXX procedure
connects to an application server that is not a DB2 UDB for iSeries or an iSeries system whose release
level is prior to V2R3M0.</div>
<p></p>
<dl class="parml">
<dt class="bold">*JOB <span class="base">or</span> *JOBRUN</dt>
<dd>The SRTSEQ value for the job is used.
<p></p>
</dd>
<dt class="bold">*HEX</dt>
<dd>A sort sequence table is not used. The hexadecimal values of the characters
are used to determine the sort sequence.
<p></p>
</dd>
<dt class="bold">*LANGIDUNQ</dt>
<dd>The sort sequence table must contain a unique weight for each character
in the code page.
<p></p>
</dd>
<dt class="bold">*LANGIDSHR</dt>
<dd>The shared-weight sort table for the LANGID specified is used.
<p></p>
</dd>
<dt class="bold"><var class="pv">srtseq-table-name</var></dt>
<dd>Specify the name of the sort sequence table to be used with this program.
The name of the sort sequence table can be qualified by one of the following
library values:
<dl class="parml">
<dt class="bold">*LIBL</dt>
<dd>All libraries in the user and system portions of the job's library list
are searched until the first match is found.
</dd>
<dt class="bold">*CURLIB</dt>
<dd>The current library for the job is searched. If no library is specified
as the current library for the job, the QGPL library is used.
</dd>
<dt class="bold"><var class="pv">library-name</var></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</dd>
</dl>
</dd>
<dt class="bold">TGTRLS </dt><a id="idx3180" name="idx3180"></a>
<dd>Specifies the release of the operating system on which the user intends
to use the object being created. The TGTRLS parameter can only be specified
in the body of SQL functions, procedures, and triggers. The possible choices
are:
<dl class="parml">
<dt class="bold">VxRxMx</dt>
<dd>Specify the release in the format VxRxMx, where Vx is the version, Rx
is the release, and Mx is the modification level. For example, V5R4M0 is
version 5, release 4, modification level 0. The object can be used on a system
with the specified release or with any subsequent release of the operating
system installed.
<p>Valid values depend on the current version, release,
and modification level, and they change with each new release. If you specify
a release-level which is earlier than the earliest release level supported
by the database manager, an error message is sent indicating the earliest
supported release.</p>
</dd>
</dl>The TGTRLS option can only be specified for SQL functions, SQL procedures,
and triggers.
</dd>
<dt class="bold">TIMFMT </dt><a id="idx3181" name="idx3181"></a>
<dd>Specifies the format used when accessing time result columns. All output
time fields are returned in the specified format. For input time strings,
the specified value is used to determine whether the time is specified in
a valid format.
<a name="wq1771"></a>
<div class="notetitle" id="wq1771">Note:</div>
<div class="notebody">An input time string that uses the format
*USA, *ISO, *EUR, or *JIS is always valid.</div>
<p></p>
<dl class="parml">
<dt class="bold">*HMS</dt>
<dd>The (hh:mm:ss) format is used.
<p></p>
</dd>
<dt class="bold">*ISO</dt>
<dd>The International Organization for Standardization (ISO) time format
(hh.mm.ss) is used.
<p></p>
</dd>
<dt class="bold">*EUR</dt>
<dd>The European time format (hh.mm.ss) is used.
<p></p>
</dd>
<dt class="bold">*USA</dt>
<dd>The United States time format (hh:mm <span class="italic">xx</span>) is
used, where <span class="italic">xx</span> is AM or PM.
<p></p>
</dd>
<dt class="bold">*JIS</dt>
<dd>The Japanese Industrial Standard time format (hh:mm:ss) is used.
</dd>
</dl>
</dd>
<dt class="bold">TIMSEP </dt><a id="idx3182" name="idx3182"></a>
<dd>Specifies the separator used when accessing time result columns.
<a name="wq1772"></a>
<div class="notetitle" id="wq1772">Note:</div>
<div class="notebody">This parameter applies only when *HMS is specified on the TIMFMT
parameter.</div>
<p></p>
<dl class="parml">
<dt class="bold">*JOB</dt>
<dd>The time separator specified for the job is used. Use the Display Job
(DSPJOB) command to determine the current value for the job.
<p></p>
</dd>
<dt class="bold">*COLON <span class="base">or</span> ':'</dt>
<dd>A colon (:) is used.
<p></p>
</dd>
<dt class="bold">*PERIOD <span class="base">or</span> '.'</dt>
<dd>A period (.) is used.
<p></p>
</dd>
<dt class="bold">*COMMA <span class="base">or</span> ','</dt>
<dd>A comma (,) is used.
<p></p>
</dd>
<dt class="bold">*BLANK <span class="base">or</span> ' '</dt>
<dd>A blank (&nbsp;) is used.
</dd>
</dl>
</dd>
<dt class="bold">USRPRF</dt><a id="idx3183" name="idx3183"></a>
<dd>Specifies the user profile that is used when the compiled program object
is run, including the authority that the program object has for each object
in static SQL statements. The profile of either the program owner or the program
user is used to control which objects can be used by the program object. This
option will be ignored in REXX.
<dl class="parml">
<dt class="bold">*NAMING</dt>
<dd>The user profile is determined by the naming convention. If the naming
convention is *SQL, USRPRF(*OWNER) is used. If the naming convention is *SYS,
USRPRF(*USER) is used.
</dd>
<dt class="bold">*USER</dt>
<dd>The profile of the user running the program object is used.
</dd>
<dt class="bold">*OWNER</dt>
<dd>The user profiles of both the program owner and the program user are
used when the program is run.
</dd>
</dl>
</dd>
</dl>
<a name="wq1773"></a>
<h3 id="wq1773"><a href="rbafzmst02.htm#ToC_1318">Notes</a></h3>
<p><span class="bold">Default values:</span> The default option values
depend on the language, object type, and the options in effect at create time:</p>
<ul>
<li>When an SQL procedure, SQL function, or SQL trigger is created, the default
options are those in effect at the time the object is created. For example,
if an SQL procedure is created and the current COMMIT option is *CS, *CS is
the default COMMIT option. Each default option is then updated as it is encountered
within the SET OPTION statement.</li>
<li>For application programs other than REXX, the default options values specified
on the CRTSQLxxx command. Each option is updated as it is encountered within
a SET OPTION statement. All SET OPTION statements must precede any other
embedded SQL statements.</li>
<li>At the start of a REXX procedure the options are set to their default
value. The default value for each option is the first value listed in the
syntax diagram. When an option is changed by a SET OPTION statement, the new
value will stay in effect until the option is changed again or the REXX procedure
ends.</li></ul>
<p><span class="bold">Syntax alternatives:</span> The following keywords are synonyms
supported for compatibility to prior releases. These keywords are non-standard
and should not be used:</p>
<ul>
<li>*UR can be used as a synonym for *CHG.</li>
<li>*NC can be used as a synonym for *NONE.</li>
<li>*RS can be used as a synonym for *ALL.</li></ul>
<a name="wq1774"></a>
<h3 id="wq1774"><a href="rbafzmst02.htm#ToC_1319">Examples</a></h3>
<p><span class="italic">Example 1</span>: Set the isolation level to *ALL and
the naming mode to SQL names. </p>
<pre class="xmp"> EXEC SQL <span class="bold">SET OPTION COMMIT</span> =<span class="bold">*ALL</span>, <span class="bold">NAMING</span> =<span class="bold">*SQL</span>
</pre><p class="indatacontent"> <span class="italic">Example 2</span>: Set the date format to European,
the isolation level to *CS, and the decimal point to the comma. </p>
<pre class="xmp"> EXEC SQL <span class="bold">SET OPTION DATFMT</span> = <span class="bold">*EUR</span>, <span class="bold">COMMIT</span> = <span class="bold">*CS</span>, <span class="bold">DECMPT</span> = <span class="bold">*COMMA</span>
</pre><a id="idx3184" name="idx3184"></a><a id="idx3185" name="idx3185"></a>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstsetep.htm">Previous Page</a> | <a href="rbafzmstsetpath.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>