1485 lines
60 KiB
HTML
1485 lines
60 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Create SQL ILE C object (CRTSQLCI)</title>
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<a name="CRTSQLCI.Top_Of_Page"></a>
|
|
<h2>Create SQL ILE C object (CRTSQLCI)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>No
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#CRTSQLCI.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#CRTSQLCI.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#CRTSQLCI.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="CRTSQLCI"></a>
|
|
<p>The Create SQL ILE C Object (CRTSQLCI) command calls the Structured Query Language (SQL) precompiler which precompiles C source containing SQL statements, produces a temporary source member, and then optionally calls the ILE C compiler to create a module, create a program, or create a service program.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="CRTSQLCI.PARAMETERS.TABLE">Parameters</a></h3>
|
|
<table border="1" cellpadding="4" cellspacing="0">
|
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
|
<tr>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.OBJ"><b>OBJ</b></a></td>
|
|
<td valign="top">Object</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Object</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*CURLIB</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.SRCFILE"><b>SRCFILE</b></a></td>
|
|
<td valign="top">Source file</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Source file</td>
|
|
<td valign="top"><i>Name</i>, <b><u>QCSRC</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#CRTSQLCI.SRCMBR"><b>SRCMBR</b></a></td>
|
|
<td valign="top">Source member</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*OBJ</u></b></td>
|
|
<td valign="top">Optional, Positional 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.COMMIT"><b>COMMIT</b></a></td>
|
|
<td valign="top">Commitment control</td>
|
|
<td valign="top"><b><u>*CHG</u></b>, *ALL, *CS, *NONE, *RR, *UR, *RS, *NC</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.RDB"><b>RDB</b></a></td>
|
|
<td valign="top">Relational database</td>
|
|
<td valign="top"><i>Simple name</i>, <b><u>*LOCAL</u></b>, *NONE</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.OBJTYPE"><b>OBJTYPE</b></a></td>
|
|
<td valign="top">Compile type</td>
|
|
<td valign="top"><b><u>*MODULE</u></b>, *PGM, *SRVPGM</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.OUTPUT"><b>OUTPUT</b></a></td>
|
|
<td valign="top">Listing output</td>
|
|
<td valign="top"><b><u>*NONE</u></b>, *PRINT</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.TEXT"><b>TEXT</b></a></td>
|
|
<td valign="top">Text 'description'</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*SRCMBRTXT</u></b>, *BLANK</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.USER"><b>USER</b></a></td>
|
|
<td valign="top">RDB user</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*CURRENT</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.PASSWORD"><b>PASSWORD</b></a></td>
|
|
<td valign="top">RDB user password</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b>, ' '</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.OPTION"><b>OPTION</b></a></td>
|
|
<td valign="top">Precompiler options</td>
|
|
<td valign="top">Values (up to 12 repetitions): <b><u>*XREF</u></b>, *NOXREF, *GEN, *NOGEN, *CNULRQD, *NOCNULRQD, *SQL, *SYS, *JOB, *SYSVAL, *PERIOD, *COMMA, *EVENTF, *NOEVENTF, *SECLVL, *NOSECLVL, *OPTLOB, *NOOPTLOB</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.TGTRLS"><b>TGTRLS</b></a></td>
|
|
<td valign="top">Target release</td>
|
|
<td valign="top"><i>Simple name</i>, <b><u>*CURRENT</u></b>, *PRV</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.INCFILE"><b>INCFILE</b></a></td>
|
|
<td valign="top">INCLUDE file</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: INCLUDE file</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*SRCFILE</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#CRTSQLCI.ALWCPYDTA"><b>ALWCPYDTA</b></a></td>
|
|
<td valign="top">Allow copy of data</td>
|
|
<td valign="top"><b><u>*OPTIMIZE</u></b>, *YES, *NO</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.CLOSQLCSR"><b>CLOSQLCSR</b></a></td>
|
|
<td valign="top">Close SQL cursor</td>
|
|
<td valign="top"><b><u>*ENDACTGRP</u></b>, *ENDMOD</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.ALWBLK"><b>ALWBLK</b></a></td>
|
|
<td valign="top">Allow blocking</td>
|
|
<td valign="top"><b><u>*ALLREAD</u></b>, *NONE, *READ</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DLYPRP"><b>DLYPRP</b></a></td>
|
|
<td valign="top">Delay PREPARE</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.GENLVL"><b>GENLVL</b></a></td>
|
|
<td valign="top">Severity level</td>
|
|
<td valign="top">0-40, <b><u>10</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.MARGINS"><b>MARGINS</b></a></td>
|
|
<td valign="top">Source margins</td>
|
|
<td valign="top"><i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Left margin</td>
|
|
<td valign="top">
|
|
1-32754, <b><u>*SRCFILE</u></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Right margin</td>
|
|
<td valign="top">
|
|
1-32754</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DATFMT"><b>DATFMT</b></a></td>
|
|
<td valign="top">Date format</td>
|
|
<td valign="top"><b><u>*JOB</u></b>, *USA, *ISO, *EUR, *JIS, *MDY, *DMY, *YMD, *JUL</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DATSEP"><b>DATSEP</b></a></td>
|
|
<td valign="top">Date separator character</td>
|
|
<td valign="top"><b><u>*JOB</u></b>, '/', '.', ',', '-', ' ', *BLANK</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.TIMFMT"><b>TIMFMT</b></a></td>
|
|
<td valign="top">Time format</td>
|
|
<td valign="top"><b><u>*HMS</u></b>, *USA, *ISO, *EUR, *JIS</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.TIMSEP"><b>TIMSEP</b></a></td>
|
|
<td valign="top">Time separator character</td>
|
|
<td valign="top"><b><u>*JOB</u></b>, ':', '.', ',', ' ', *BLANK</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.REPLACE"><b>REPLACE</b></a></td>
|
|
<td valign="top">Replace</td>
|
|
<td valign="top"><b><u>*YES</u></b>, *NO</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.RDBCNNMTH"><b>RDBCNNMTH</b></a></td>
|
|
<td valign="top">RDB connect method</td>
|
|
<td valign="top"><b><u>*DUW</u></b>, *RUW</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DFTRDBCOL"><b>DFTRDBCOL</b></a></td>
|
|
<td valign="top">Default collection</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*NONE</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DYNDFTCOL"><b>DYNDFTCOL</b></a></td>
|
|
<td valign="top">Dynamic default collection</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.SQLPKG"><b>SQLPKG</b></a></td>
|
|
<td valign="top">Package</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Package</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*OBJ</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*OBJLIB</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#CRTSQLCI.SQLPATH"><b>SQLPATH</b></a></td>
|
|
<td valign="top">SQL path</td>
|
|
<td valign="top">Single values: <b><u>*NAMING</u></b>, *LIBL<br>Other values (up to 268 repetitions): <i>Name</i></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.SQLCURRULE"><b>SQLCURRULE</b></a></td>
|
|
<td valign="top">SQL rules</td>
|
|
<td valign="top"><b><u>*DB2</u></b>, *STD</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.SAAFLAG"><b>SAAFLAG</b></a></td>
|
|
<td valign="top">IBM SQL flagging</td>
|
|
<td valign="top"><b><u>*NOFLAG</u></b>, *FLAG</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.FLAGSTD"><b>FLAGSTD</b></a></td>
|
|
<td valign="top">ANS flagging</td>
|
|
<td valign="top"><b><u>*NONE</u></b>, *ANS</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.PRTFILE"><b>PRTFILE</b></a></td>
|
|
<td valign="top">Print file</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Print file</td>
|
|
<td valign="top"><i>Name</i>, <b><u>QSYSPRT</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DBGVIEW"><b>DBGVIEW</b></a></td>
|
|
<td valign="top">Debugging view</td>
|
|
<td valign="top"><b><u>*NONE</u></b>, *SOURCE</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.USRPRF"><b>USRPRF</b></a></td>
|
|
<td valign="top">User profile</td>
|
|
<td valign="top"><b><u>*NAMING</u></b>, *USER, *OWNER</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.DYNUSRPRF"><b>DYNUSRPRF</b></a></td>
|
|
<td valign="top">Dynamic user profile</td>
|
|
<td valign="top"><b><u>*USER</u></b>, *OWNER</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.SRTSEQ"><b>SRTSEQ</b></a></td>
|
|
<td valign="top">Sort sequence</td>
|
|
<td valign="top">Single values: <b><u>*JOB</u></b>, *HEX, *JOBRUN, *LANGIDUNQ, *LANGIDSHR<br>Other values: <i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Sort sequence</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#CRTSQLCI.LANGID"><b>LANGID</b></a></td>
|
|
<td valign="top">Language id</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*JOB</u></b>, *JOBRUN</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CRTSQLCI.TOSRCFILE"><b>TOSRCFILE</b></a></td>
|
|
<td valign="top">To source file</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: To source file</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*CALC</u></b></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>QTEMP</u></b>, *LIBL, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top" rowspan="4"><a href="#CRTSQLCI.DECRESULT"><b>DECRESULT</b></a></td>
|
|
<td valign="top">Decimal result options</td>
|
|
<td valign="top"><i>Element list</i></td>
|
|
<td valign="top" rowspan="4">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Maximum precision</td>
|
|
<td valign="top">
|
|
<b><u>31</u></b>, 63</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Maximum scale</td>
|
|
<td valign="top">
|
|
0-63, <b><u>31</u></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 3: Minimum divide scale</td>
|
|
<td valign="top">
|
|
0-9, <b><u>0</u></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CRTSQLCI.COMPILEOPT"><b>COMPILEOPT</b></a></td>
|
|
<td valign="top">Compiler options</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="CRTSQLCI.OBJ"></a>
|
|
<h3>Object (OBJ)</h3>
|
|
<p>Specifies the object to be created.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p><b>Qualifier 1: Object</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the object to be created.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CURLIB</u></b></dt>
|
|
<dd>The new object is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library where the object is created.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SRCFILE"></a>
|
|
<h3>Source file (SRCFILE)</h3>
|
|
<p>Specifies the source file that contains the C source statements and SQL statements.
|
|
</p>
|
|
<p><b>Qualifier 1: Source file</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>QCSRC</u></b></dt>
|
|
<dd>Source file QCSRC contains the C source.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the source file that contains the C source. The source file can be a database file, device file, or an inline data file.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the job's library list are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></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><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be searched.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SRCMBR"></a>
|
|
<h3>Source member (SRCMBR)</h3>
|
|
<p>Specifies the source file member that contains the input source. This parameter is used only if the source file specified for the <b>Source file (SRCFILE)</b> parameter is a database file.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>The source file member that has the same name as the value specified for the <b>Object (OBJ)</b> parameter contains the input source.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the source file member that contains the input source.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.COMMIT"></a>
|
|
<h3>Commitment control (COMMIT)</h3>
|
|
<p>Specifies whether SQL statements in the compiled program are run under commitment control. Files referred to in the host language source are not affected by this option. Only SQL tables, SQL views, and SQL packages referred to in SQL statements are affected.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CHG</u> <i>or</i> <u>*UR</u></b></dt>
|
|
<dd>Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs can be seen.
|
|
</dd>
|
|
<dt><b>*CS</b></dt>
|
|
<dd>Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows updated, deleted, and inserted are locked until the end of the unit of work (transaction). A row that is selected, but not updated, is locked until the next row is selected. Uncommitted changes in other jobs cannot be seen.
|
|
</dd>
|
|
<dt><b>*ALL <i>or</i> *RS</b></dt>
|
|
<dd>Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows selected, updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs cannot be seen.
|
|
</dd>
|
|
<dt><b>*NONE <i>or</i> *NC</b></dt>
|
|
<dd>Specifies that commitment control is not used. Uncommitted changes in other jobs can be seen. If the SQL DROP SCHEMA statement is included in the program, *NONE or *NC must be used. If a relational database is specified for the <b>Relational database (RDB)</b> parameter, and the relational database is on a system that is not on an iSeries system, *NONE or *NC cannot be specified.
|
|
</dd>
|
|
<dt><b>*RR</b></dt>
|
|
<dd>Specifies the objects referred to in SQL ALTER, CALL, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, RENAME, and REVOKE statements and the rows selected, updated, deleted, and inserted are locked until the end of the unit of work (transaction). Uncommitted changes in other jobs cannot be seen. All tables referred to in SELECT, UPDATE, DELETE, and INSERT statements are locked exclusively until the end of the unit of work (transaction).
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.RDB"></a>
|
|
<h3>Relational database (RDB)</h3>
|
|
<p>Specifies the name of the relational database where the SQL package is to be created.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LOCAL</u></b></dt>
|
|
<dd>The program is created as a distributed SQL program. The SQL statements will access the local database. An SQL package object is not created as part of the precompile process. The Create Structured Query Language Package (CRTSQLPKG) command can be used.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>An SQL package object is not created. The program object is not a distributed program and the Create Structured Query Language Package (CRTSQLPKG) command cannot be used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the relational database where the new SQL package object is to be created. When the name of the local relational database is specified, the program created is still a distributed SQL program. The SQL statements will access the local database.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.OBJTYPE"></a>
|
|
<h3>Compile type (OBJTYPE)</h3>
|
|
<p>Specifies the type of object to be created.
|
|
</p>
|
|
<p>When OBJTYPE(*PGM) or OBJTYPE(*SRVPGM) is specified and the RDB parameter is also specified, the CRTSQLPKG command is issued by the SQL precompiler after the program has been created. When OBJTYPE(*MODULE) is specified, an SQL package is not created and you must issue the CRTSQLPKG command after the CRTPGM or CRTSRVPGM command has created the program.
|
|
</p>
|
|
<p>If OPTION(*NOGEN) is specified, only the SQL temporary source member is generated. No module, program, service program, or SQL package is created.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*PGM</u></b></dt>
|
|
<dd>The SQL precompiler calls the compiler to create a program.
|
|
</dd>
|
|
<dt><b>*MODULE</b></dt>
|
|
<dd>The SQL precompiler calls the compiler to create a module.
|
|
</dd>
|
|
<dt><b>*SRVPGM</b></dt>
|
|
<dd>The SQL precompiler calls the compiler to create a module and issues the Create Service Program (CRTSRVPGM) command to create a service program.
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<b>Note: </b>If *SRVPGM is specified, there must be a source member in source file QSRVSRC that has the same name as the name specified for the OBJ parameter. The source member must contain the export information for the module.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.OUTPUT"></a>
|
|
<h3>Listing output (OUTPUT)</h3>
|
|
<p>Specifies whether the precompiler listing is generated.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>The precompiler listing is not generated.
|
|
</dd>
|
|
<dt><b>*PRINT</b></dt>
|
|
<dd>The precompiler listing is generated.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.TEXT"></a>
|
|
<h3>Text 'description' (TEXT)</h3>
|
|
<p>Specifies text that briefly describes the program and its function.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SRCMBRTXT</u></b></dt>
|
|
<dd>The text is taken from the source file member being used to create the program. If the source file is an inline file or a device file, the text is blank.
|
|
</dd>
|
|
<dt><b>*BLANK</b></dt>
|
|
<dd>No text is specified.
|
|
</dd>
|
|
<dt><b><i>'description'</i></b></dt>
|
|
<dd>Specify no more than 50 characters, enclosed in apostrophes.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.USER"></a>
|
|
<h3>RDB user (USER)</h3>
|
|
<p>Specifies the user name sent to the remote system when starting the conversation. This parameter is valid only when RDB is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CURRENT</u></b></dt>
|
|
<dd>The user name associated with the current job is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the user name to be used for the application server job.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.PASSWORD"></a>
|
|
<h3>RDB user password (PASSWORD)</h3>
|
|
<p>Specifies the password to be used on the remote system. This parameter is valid only when RDB is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>No password is sent. A user name cannot be specified for the <b>RDB user (USER)</b> parameter if this value is specified.
|
|
<p>
|
|
<b>Note: </b>Specifying a password of a blank is the same as specifying *NONE.
|
|
</p>
|
|
</dd>
|
|
<dt><b><i>password</i></b></dt>
|
|
<dd>Specify the password of the user name specified for the USER parameter.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.OPTION"></a>
|
|
<h3>Precompiler options (OPTION)</h3>
|
|
<p>Specifies whether one or more of the following options are used when the C source is precompiled. If an option is specified more than once, or if two options conflict, the last option specified is used.
|
|
</p>
|
|
<p><b>Cross reference</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*XREF</u></b></dt>
|
|
<dd>The precompiler cross-references items in the program to the statement numbers in the program that refer to those items.
|
|
</dd>
|
|
<dt><b>*NOXREF</b></dt>
|
|
<dd>The precompiler does not cross-reference names.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Program creation</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*GEN</u></b></dt>
|
|
<dd>The precompiler creates the object that is specified for the OBJTYPE parameter.
|
|
</dd>
|
|
<dt><b>*NOGEN</b></dt>
|
|
<dd>The precompiler does not call the ILE C compiler, and a module, program, service program, or SQL package is not created.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Decimal point</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*PERIOD</u></b></dt>
|
|
<dd>The value used as the decimal point for numeric constants used in SQL statements is a period. This value is also used as the decimal point character when casting a numeric value to character.
|
|
</dd>
|
|
<dt><b>*JOB</b></dt>
|
|
<dd>The representation for the decimal point specified for the job at precompile time is used.
|
|
<p>
|
|
<b>Note: </b>If QDECFMT specifies that the value used as the decimal point is a comma, any numeric constants in lists (such as in the SELECT clause or the VALUES clause) must be separated by a comma followed by a blank. For example, VALUES(1,1, 2,23, 4,1) is equivalent to VALUES(1.1,2.23,4.1) in which the decimal point is a period.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*SYSVAL</b></dt>
|
|
<dd>The value used as the decimal point is the QDECFMT system value.
|
|
<p>
|
|
<b>Note: </b>If QDECFMT specifies that the value used as the decimal point is a comma, any numeric constants in lists (such as in the SELECT clause or the VALUES clause) must be separated by a comma followed by a blank. For example, VALUES(1,1, 2,23, 4,1) is equivalent to VALUES(1.1,2.23,4.1) in which the decimal point is a period.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*COMMA</b></dt>
|
|
<dd>The value used as the decimal point is a comma.
|
|
<p>
|
|
<b>Note: </b>Any numeric constants in lists (such as in the SELECT clause or the VALUES clause) must be separated by a comma followed by a blank. For example, VALUES(1,1, 2,23, 4,1) is equivalent to VALUES(1.1,2.23,4.1) where the decimal point is a period.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
<p><b>Naming convention</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SYS</u></b></dt>
|
|
<dd>Specifies that the system naming convention is used (library-name/file-name).
|
|
</dd>
|
|
<dt><b>*SQL</b></dt>
|
|
<dd>Specifies that the SQL naming convention is used (schema-name.table-name).
|
|
<p>If a relational database is specified for the <b>Relational database (RDB)</b> parameter, and the database is on a system that is not an iSeries system, *SQL must be specified as the naming convention.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
<p><b>Second-level message text</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NOSECLVL</u></b></dt>
|
|
<dd>Second-level text descriptions are not added to the listing.
|
|
</dd>
|
|
<dt><b>*SECLVL</b></dt>
|
|
<dd>Second-level text with replacement data is added for all messages on the listing.
|
|
</dd>
|
|
</dl>
|
|
<p><b>NUL required</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NOCNULRQD</u></b></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>
|
|
<dt><b>*CNULRQD</b></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>
|
|
</dl>
|
|
<p><b>LOB optimization for DRDA</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OPTLOB</u></b></dt>
|
|
<dd>The first FETCH for a cursor determines how the cursor will be used for LOBs (Large Objects) 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 host variable.
|
|
</p>
|
|
<p>If the first FETCH places the LOB column into a LOB host variable, no subsequent FETCH for that cursor can use a LOB locator for that column.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*NOOPTLOB</b></dt>
|
|
<dd>There is no restriction on whether a column is retrieved into a LOB locator or into a LOB host variable. This option can cause performance to degrade.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Event file creation</b> options:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NOEVENTF</u></b></dt>
|
|
<dd>The compiler will not produce an event file for use by CoOperative Development Environment (CODE).
|
|
</dd>
|
|
<dt><b>*EVENTF</b></dt>
|
|
<dd>The compiler produces an event file for use by CoOperative Development Environment (CODE). The event file will be created as a member in the file EVFEVENT in your object library. CODE uses this file to offer error feedback integrated with the CODE editor. This option is normally specified by CODE on your behalf.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.TGTRLS"></a>
|
|
<h3>Target release (TGTRLS)</h3>
|
|
<p>Specifies the release of the operating system on which you intend to use the object being created.
|
|
</p>
|
|
<p>When specifying the <b>target-release</b> value, the format VxRxMx is used to specify the release, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V5R3M0 is version 5, release 3, modification 0.
|
|
</p>
|
|
<p>Valid values depend on the current version, release, and modification level of the operating system, and they change with each new release. You can press F4 while prompting this command parameter to see a list of valid target release values.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CURRENT</u></b></dt>
|
|
<dd>The object is to be used on the release of the operating system currently running on your system. The object can also be used on a system with any subsequent release of the operating system installed.
|
|
</dd>
|
|
<dt><b>*PRV</b></dt>
|
|
<dd>The object is to be used on the previous release with modification level 0 of the operating system. The object can also be used on a system with any subsequent release of the operating system installed.
|
|
</dd>
|
|
<dt><b><i>target-release</i></b></dt>
|
|
<dd>Specify the release in the format VxRxMx. The object can be used on a system with the specified release or with any subsequent release of the operating system installed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.INCFILE"></a>
|
|
<h3>INCLUDE file (INCFILE)</h3>
|
|
<p>Specifies the source file that contains members to be included in the program with the SQL INCLUDE statement.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SRCFILE</u></b></dt>
|
|
<dd>The qualified source file you specify for the <b>Source file (SRCFILE)</b> parameter contains the source file members specified on any SQL INCLUDE statements.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 1: INCLUDE file</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the source file that contains the source file members specified on any SQL INCLUDE statements.
|
|
<p>The record length of the source file you specify here must be no less than the record length of the source file you specify for the <b>Source file (SRCFILE)</b> parameter.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the job's library list are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></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><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library where the source file is located.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.ALWCPYDTA"></a>
|
|
<h3>Allow copy of data (ALWCPYDTA)</h3>
|
|
<p>Specifies whether a copy of the data can be used in a SELECT statement.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OPTIMIZE</u></b></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 the <b>Commitment control (COMMIT)</b> parameter is not *NONE, the <b>Allow blocking (ALWBLK)</b> parameter should be set to *ALLREAD, when possible, for best performance.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>A copy of the data is used only when necessary.
|
|
</dd>
|
|
<dt><b>*NO</b></dt>
|
|
<dd>A copy of the data is not used. If a temporary copy of the data is required to perform the query, an error message is returned.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.CLOSQLCSR"></a>
|
|
<h3>Close SQL cursor (CLOSQLCSR)</h3>
|
|
<p>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 the user issues the CLOSE, COMMIT, or ROLLBACK (without HOLD) SQL statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ENDACTGRP</u></b></dt>
|
|
<dd>SQL cursors are closed and SQL prepared statements are implicitly discarded, and LOCK TABLE locks are released when the activation group ends.
|
|
</dd>
|
|
<dt><b>*ENDMOD</b></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>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.ALWBLK"></a>
|
|
<h3>Allow blocking (ALWBLK)</h3>
|
|
<p>Specifies whether the database manager can use record blocking and the extent to which blocking can be used for read-only cursors.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ALLREAD</u></b></dt>
|
|
<dd>Rows are blocked for read-only cursors. All cursors in a program that are not explicitly able to be changed are opened for read-only processing even though there may be EXECUTE or EXECUTE IMMEDIATE statements in the program.
|
|
<p>Specifying *ALLREAD:
|
|
</p>
|
|
<ul>
|
|
<li>Allows record blocking for all read-only cursors.
|
|
</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 *ALLREAD is specified.
|
|
</li>
|
|
<li>Dynamic running of a positioned UPDATE or DELETE statement (for example, using EXECUTE IMMEDIATE), can not 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><b>*NONE</b></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><b>*READ</b></dt>
|
|
<dd>Records are blocked for read-only retrieval of data for cursors when:
|
|
<ul>
|
|
<li>*NONE is specified for the <b>Commitment control (COMMIT)</b> 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>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DLYPRP"></a>
|
|
<h3>Delay PREPARE (DLYPRP)</h3>
|
|
<p>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.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></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><b>*YES</b></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 for this parameter for precompiled programs, you should check the SQLCODE and SQLSTATE after running an OPEN, EXECUTE, or DESCRIBE statement to ensure that the dynamic statement is valid.
|
|
<p>
|
|
<b>Note: </b>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.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.GENLVL"></a>
|
|
<h3>Severity level (GENLVL)</h3>
|
|
<p>Specifies whether the compiler is called, depending on the severity of messages generated as a result of errors found by the SQL precompiler. If precompiler errors are generated that have a message severity level greater than the value specified for this parameter, the compiler is not called.
|
|
</p>
|
|
<p>If the <b>Relational database (RDB)</b> parameter is specified and the severity of the messages generated as a result of package creation is greater than the severity level specified for this parameter, the SQL package is not created.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>10</u></b></dt>
|
|
<dd>Do not call the compiler if SQL precompiler messages with a message severity greater than 10 are generated.
|
|
</dd>
|
|
<dt><b><i>0-40</i></b></dt>
|
|
<dd>Specify the maximum SQL precompiler message severity level to be used to control whether the compiler is called.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.MARGINS"></a>
|
|
<h3>Source margins (MARGINS)</h3>
|
|
<p>Specifies the part of the precompiler input record that contains source text.
|
|
</p>
|
|
<p><b>Element 1: Left margin</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SRCFILE</u></b></dt>
|
|
<dd>The left margin will be set to 1 and the right margin will be set to the record length of the input source file.
|
|
</dd>
|
|
<dt><b><i>1-32754</i></b></dt>
|
|
<dd>Specify the beginning position to be used for each input record.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Right margin</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>1-32754</i></b></dt>
|
|
<dd>Specify the ending position to be used for each input record.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DATFMT"></a>
|
|
<h3>Date format (DATFMT)</h3>
|
|
<p>Specifies the format used when accessing date result columns. All output date fields are returned in the format you specify. For input date strings, the value you specify is used to determine whether the date is a valid format.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>An input date string that uses the format *USA, *ISO, *EUR, or *JIS is always valid.
|
|
</p>
|
|
<p>If you connect to a relational database that is on a system that is not an iSeries system, the format must be *USA, *ISO, *EUR, or *JIS.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JOB</u></b></dt>
|
|
<dd>The format specified for the job at precompile time or when a new interactive SQL session is created is used.
|
|
<p>Use the Display Job (DSPJOB) command to determine the current date format for the job.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*USA</b></dt>
|
|
<dd>The United States date format <b>mm/dd/yyyy</b> is used.
|
|
</dd>
|
|
<dt><b>*ISO</b></dt>
|
|
<dd>The International Organization for Standardization (ISO) date format <b>yyyy-mm-dd</b> is used.
|
|
</dd>
|
|
<dt><b>*EUR</b></dt>
|
|
<dd>The European date format <b>dd.mm.yyyy</b> is used.
|
|
</dd>
|
|
<dt><b>*JIS</b></dt>
|
|
<dd>The Japanese Industrial Standard date format <b>yyyy-mm-dd</b> is used.
|
|
</dd>
|
|
<dt><b>*MDY</b></dt>
|
|
<dd>The date format <b>mm/dd/yy</b> is used.
|
|
</dd>
|
|
<dt><b>*DMY</b></dt>
|
|
<dd>The date format <b>dd/mm/yy</b> is used.
|
|
</dd>
|
|
<dt><b>*YMD</b></dt>
|
|
<dd>The date format <b>yy/mm/dd</b> is used.
|
|
</dd>
|
|
<dt><b>*JUL</b></dt>
|
|
<dd>The Julian date format <b>yy/ddd</b> is used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DATSEP"></a>
|
|
<h3>Date separator character (DATSEP)</h3>
|
|
<p>Specifies the separator to be used when accessing date result columns.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>This parameter applies only when *JOB, *MDY, *DMY, *YMD, or *JUL is specified for the <b>Date format (DATFMT)</b> parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JOB</u></b></dt>
|
|
<dd>The date separator specified for the job at precompile time, when a new interactive SQL session is created, or when Run SQL Statement (RUNSQLSTM) command is run.
|
|
<p>Use the Display Job (DSPJOB) command to determine the current date separator value for the job.
|
|
</p>
|
|
</dd>
|
|
<dt><b>'/'</b></dt>
|
|
<dd>A slash is used as the date separator.
|
|
</dd>
|
|
<dt><b>'.'</b></dt>
|
|
<dd>A period is used as the date separator.
|
|
</dd>
|
|
<dt><b>'-'</b></dt>
|
|
<dd>A dash is used as the date separator.
|
|
</dd>
|
|
<dt><b>','</b></dt>
|
|
<dd>A comma is used as the date separator.
|
|
</dd>
|
|
<dt><b>' ' <i>or</i> *BLANK</b></dt>
|
|
<dd>A blank is used as the date separator.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.TIMFMT"></a>
|
|
<h3>Time format (TIMFMT)</h3>
|
|
<p>Specifies the format used when accessing time result columns. All output time fields are returned in the format you specify. For input time strings, the value you specify is used to determine whether the time is specified in a valid format.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>An input time string that uses the format *USA, *ISO, *EUR, or *JIS is always valid.
|
|
</p>
|
|
<p>If you connect to a relational database that is on a system that is not another iSeries system, the time format must be *USA, *ISO, *EUR, *JIS, or *HMS with a time separator of a colon or period.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*HMS</u></b></dt>
|
|
<dd>The <b>hh:mm:ss</b> format is used.
|
|
</dd>
|
|
<dt><b>*USA</b></dt>
|
|
<dd>The United States time format <b>hh:mmxx</b> is used, where <b>xx</b> is AM or PM.
|
|
</dd>
|
|
<dt><b>*ISO</b></dt>
|
|
<dd>The International Organization for Standardization (ISO) time format <b>hh.mm.ss</b> is used.
|
|
</dd>
|
|
<dt><b>*EUR</b></dt>
|
|
<dd>The European time format <b>hh.mm.ss</b> is used.
|
|
</dd>
|
|
<dt><b>*JIS</b></dt>
|
|
<dd>The Japanese Industrial Standard time format <b>hh:mm:ss</b> is used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.TIMSEP"></a>
|
|
<h3>Time separator character (TIMSEP)</h3>
|
|
<p>Specifies the separator used when accessing time result columns.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>This parameter applies only when *HMS is specified for the <b>Time format (TIMFMT)</b> parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JOB</u></b></dt>
|
|
<dd>The time separator specified for the job at precompile time, when a new interactive SQL session is created, or when RUNSQLSTM is run is used.
|
|
<p>Use the Display Job (DSPJOB) command to determine the current time separator value for the job.
|
|
</p>
|
|
</dd>
|
|
<dt><b>':'</b></dt>
|
|
<dd>A colon is used as the time separator.
|
|
</dd>
|
|
<dt><b>'.'</b></dt>
|
|
<dd>A period is used as the time separator.
|
|
</dd>
|
|
<dt><b>','</b></dt>
|
|
<dd>A comma is used as the time separator.
|
|
</dd>
|
|
<dt><b>' ' <i>or</i> *BLANK</b></dt>
|
|
<dd>A blank is used as the time separator.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.REPLACE"></a>
|
|
<h3>Replace (REPLACE)</h3>
|
|
<p>Specifies if a SQL module, program, service program or package is created when there is an existing SQL module, program, service program, or package of the same name and type in the same library. The value for this parameter is passed to the CRTCMOD, CRTBNDC, CRTSRVPGM, and CRTSQLPKG commands.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*YES</u></b></dt>
|
|
<dd>A new SQL module, program, service program, or package is created, and any existing object of the same name and type in the specified library is moved to QRPLOBJ.
|
|
</dd>
|
|
<dt><b>*NO</b></dt>
|
|
<dd>A new SQL module, program, service program, or package is not created if an object of the same name and type already exists in the specified library.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.RDBCNNMTH"></a>
|
|
<h3>RDB connect method (RDBCNNMTH)</h3>
|
|
<p>Specifies the semantics used for CONNECT statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*DUW</u></b></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><b>*RUW</b></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>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DFTRDBCOL"></a>
|
|
<h3>Default collection (DFTRDBCOL)</h3>
|
|
<p>Specifies the name of the schema identifier used for the unqualified names of the tables, views, indexes, SQL packages, aliases, constraints, external programs, node groups, and triggers. This parameter applies only to static SQL statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>The naming convention specified for the <b>Precompiler options (OPTION)</b> parameter is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the schema identifier to be used instead of the naming convention specified for the OPTION parameter.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DYNDFTCOL"></a>
|
|
<h3>Dynamic default collection (DYNDFTCOL)</h3>
|
|
<p>Specifies whether the default schema name specified for the DFTRDBCOL parameter is also used for dynamic statments.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>Do not use the value specified for the DFTRDBCOL parameter for unqualified names of tables, views, indexes, SQL packages, aliases, constraints, external programs, node groups, and triggers for dynamic SQL statements. The naming convention specified for the <b>Precompiler options (OPTION)</b> parameter is used.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>The schema name specified for the DFTRDBCOL parameter will be used for the unqualified names of the tables, views, indexes, SQL packages, aliases, constraints, external programs, node groups, and triggers in dynamic SQL statements.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SQLPKG"></a>
|
|
<h3>Package (SQLPKG)</h3>
|
|
<p>Specifies the qualified name of the SQL package created on the relational database specified for the RDB parameter of this command.
|
|
</p>
|
|
<p><b>Qualifier 1: Package</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>The name of the SQL package is the same as the object name specified for the OBJ parameter.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the SQL package. If the remote system is not an iSeries system, no more than 8 characters can be specified.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJLIB</u></b></dt>
|
|
<dd>The package is created in the library with the same name as the library specified for the OBJ parameter.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library where the package is created.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SQLPATH"></a>
|
|
<h3>SQL path (SQLPATH)</h3>
|
|
<p>Specifies the path to be used to find procedures, functions, and user defined types in static SQL statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NAMING</u></b></dt>
|
|
<dd>The path used depends on the naming convention specified for the <b>Precompiler options (OPTION)</b> parameter.
|
|
<p>For *SYS naming, the path used is *LIBL, the current library list at runtime.
|
|
</p>
|
|
<p>For *SQL naming, the path used is "QSYS", "QSYS2", "userid", where "userid" is the value of the USER special register. If a schema name is specified for the DFTRDBCOL parameter, the schema name takes the place of userid.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*LIBL</b></dt>
|
|
<dd>The path used is the library list at runtime.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify one or more schema names. A maximum of 268 schema names may be specified.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SQLCURRULE"></a>
|
|
<h3>SQL rules (SQLCURRULE)</h3>
|
|
<p>Specifies the semantics used for SQL statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*DB2</u></b></dt>
|
|
<dd>The semantics of all SQL statements will default to the rules established for DB2. The following semantics are controlled by this option:
|
|
<p>Hexadecimal constants are treated as character data.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*STD</b></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:
|
|
<p>Hexadecimal constants are treated as binary data.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SAAFLAG"></a>
|
|
<h3>IBM SQL flagging (SAAFLAG)</h3>
|
|
<p>Specifies the IBM SQL flagging function. This parameter allows you to flag SQL statements to verify whether they conform to IBM SQL syntax.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NOFLAG</u></b></dt>
|
|
<dd>No checks are made to see whether SQL statements conform to IBM SQL syntax.
|
|
</dd>
|
|
<dt><b>*FLAG</b></dt>
|
|
<dd>Checks are made to see whether SQL statements conform to IBM SQL syntax.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.FLAGSTD"></a>
|
|
<h3>ANS flagging (FLAGSTD)</h3>
|
|
<p>Specifies whether non-standard statements are flagged. This parameter allows you to flag SQL statements to verify whether they conform to the Core level of the ISO/IEC 9075-2003 standards.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No checks are made to see whether SQL statements conform to ANSI standards.
|
|
</dd>
|
|
<dt><b>*ANS</b></dt>
|
|
<dd>Checks are made to see whether SQL statements conform to standards.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.PRTFILE"></a>
|
|
<h3>Print file (PRTFILE)</h3>
|
|
<p>Specifies the printer device file to be used for the precompiler output listing.
|
|
</p>
|
|
<p><b>Qualifier 1: Print file</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>QSYSPRT</u></b></dt>
|
|
<dd>The precompiler output file is directed to the IBM-supplied printer file, QSYSPRT. The file QSYSPRT has a record length of 132. If you specify a file whose record length is less than 132, information is lost.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the printer device file to which the precompiler output is directed.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the job's library list are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></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><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library where the printer file is located.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DBGVIEW"></a>
|
|
<h3>Debugging view (DBGVIEW)</h3>
|
|
<p>Specifies the type of source debug information to be provided by the SQL precompiler.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>The source view will not be generated.
|
|
</dd>
|
|
<dt><b>*SOURCE</b></dt>
|
|
<dd>The SQL precompiler will provide the source views for the root and if necessary, SQL INCLUDE statements. A view is to be provided which contains the statements generated by the precompiler.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.USRPRF"></a>
|
|
<h3>User profile (USRPRF)</h3>
|
|
<p>Specifies the user profile that is used when the compiled program object and SQL package object is run, including the authority that the program object or SQL package has for each object in static SQL statements. The profile of either the owner or the user is used to control access to objects.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NAMING</u></b></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><b>*USER</b></dt>
|
|
<dd>The profile of the user running the program or SQL package is used.
|
|
</dd>
|
|
<dt><b>*OWNER</b></dt>
|
|
<dd>The user profiles of both the owner and the user are used when the program or SQL package is run.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DYNUSRPRF"></a>
|
|
<h3>Dynamic user profile (DYNUSRPRF)</h3>
|
|
<p>Specifies the user profile used for dynamic SQL statements.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*USER</u></b></dt>
|
|
<dd>Local dynamic SQL statements are run under the profile of the program's user. Distributed dynamic SQL statements are run under the profile of the application server job.
|
|
</dd>
|
|
<dt><b>*OWNER</b></dt>
|
|
<dd>Local dynamic SQL statements are run under the profile of the program's owner. Distributed dynamic SQL statements are run under the profile of the SQL package's owner.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.SRTSEQ"></a>
|
|
<h3>Sort sequence (SRTSEQ)</h3>
|
|
<p>Specifies the sort sequence table to be used for string comparisons in SQL statements.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>*HEX must be specified for this parameter on distributed applications where the application server is not on an iSeries system.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JOB</u></b></dt>
|
|
<dd>The SRTSEQ value for the job is used.
|
|
</dd>
|
|
<dt><b>*JOBRUN</b></dt>
|
|
<dd>The SRTSEQ value for the job is retrieved when the program is run. For distributed applications, SRTSEQ(*JOBRUN) is valid only when LANGID(*JOBRUN) is also specified.
|
|
</dd>
|
|
<dt><b>*LANGIDUNQ</b></dt>
|
|
<dd>The unique-weight sort table for the language specified for the <b>Language id (LANGID)</b> parameter is used.
|
|
</dd>
|
|
<dt><b>*LANGIDSHR</b></dt>
|
|
<dd>The shared-weight sort table for the language specified for the LANGID parameter is used.
|
|
</dd>
|
|
<dt><b>*HEX</b></dt>
|
|
<dd>A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 1: Sort sequence</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the sort sequence table to be used with this program.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the job's library list are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></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><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be searched.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.LANGID"></a>
|
|
<h3>Language id (LANGID)</h3>
|
|
<p>Specifies the language identifier to be used when SRTSEQ(*LANGIDUNQ) or SRTSEQ(*LANGIDSHR) is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JOB</u></b></dt>
|
|
<dd>The LANGID value for the job is retrieved during the precompile.
|
|
</dd>
|
|
<dt><b>*JOBRUN</b></dt>
|
|
<dd>The LANGID value for the job is retrieved when the program is run. For distributed applications, LANGID(*JOBRUN) is valid only when SRTSEQ(*JOBRUN) is also specified.
|
|
</dd>
|
|
<dt><b><i>language-id</i></b></dt>
|
|
<dd>Specify the language identifier to be used by the program.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.TOSRCFILE"></a>
|
|
<h3>To source file (TOSRCFILE)</h3>
|
|
<p>Specifies the source file that is to contain the output source member that has been processed by the SQL precompiler. If the specified source file is not found, it will be created. The output member will have the same name as the name specified for the SRCMBR parameter.
|
|
</p>
|
|
<p><b>Qualifier 1: To source file</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CALC</u></b></dt>
|
|
<dd>The output source file name will be generated based on the margins of the source file. The name will be QSQLTxxxxx, where xxxxx is the width of the source file. If the source file record length is less than or equal to 92, the name will be QSQLTEMP.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the source file to contain the output source member.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>QTEMP</u></b></dt>
|
|
<dd>The library QTEMP will be used.
|
|
</dd>
|
|
<dt><b>*LIBL</b></dt>
|
|
<dd>The job's library list is searched for the specified file. If the file is not found in any library in the library list, the file will be created in the current library.
|
|
</dd>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the job will be used. If no library is specified as the current library for the job, the QGPL library is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library that is to contain the output source file.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.DECRESULT"></a>
|
|
<h3>Decimal result options (DECRESULT)</h3>
|
|
<p>Specifies the maximum precision, maximum scale and minimum divide scale that should be returned for result data types. The specified limit only applies to numeric (zoned) and decimal (packed) data types used in arithmetic expressions and in SQL column functions AVG and SUM.
|
|
</p>
|
|
<p><b>Element 1: Maximum precision</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>31</u></b></dt>
|
|
<dd>The maximum precision (length) that should be returned for the result data types is 31 digits.
|
|
</dd>
|
|
<dt><b>63</b></dt>
|
|
<dd>The maximum precision (length) that should be returned for the result data types is 63 digits.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Maximum scale</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>31</u></b></dt>
|
|
<dd>The maximum scale (number of decimal positions to the right of the decimal point) that should be returned for the result data types is 31 digits.
|
|
</dd>
|
|
<dt><b><i>0-63</i></b></dt>
|
|
<dd>Specify the maximum scale (number of decimal positions to the right of the decimal point) that should be returned for the result data types. The value can range from 0 to the maximum precision.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 3: Minimum divide scale</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>0</u></b></dt>
|
|
<dd>The minimum divide scale (number of decimal positions to the right of the decimal point) that should be returned for both intermediate and result data types is 0.
|
|
</dd>
|
|
<dt><b><i>0-9</i></b></dt>
|
|
<dd>Specify the minimum divide scale (number of decimal positions to the right of the decimal point) that should be returned for both intermediate and result data types. The value cannot to exceed the maximum scale. If 0 is specified for the maximum scale, minimum divide scale is not used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CRTSQLCI.COMPILEOPT"></a>
|
|
<h3>Compiler options (COMPILEOPT)</h3>
|
|
<p>Specifies additional parameters to be used on the compiler command. The COMPILEOPT string is added to the compiler command built by the precompiler. If <b>INCDIR(</b> is anywhere in the string, the precompiler will call the compiler using the SRCSTMF parameter. There is no validation of the string. The compiler command will issue an error if any parameter is incorrect. Please refer to the SQL Programming information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter for a list of parameters that the precompiler generates for the compiler command. Using any of the keywords that the precompiler passes to the compiler will cause the compiler command to fail because of duplicate parameters.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No additional parameters will be used on the compiler command.
|
|
</dd>
|
|
<dt><b><i>character-value</i></b></dt>
|
|
<dd>Specify no more than 5000 characters, enclosed in apostrophes.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CRTSQLCI.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p>
|
|
<pre>
|
|
CRTSQLCI OBJ(PAYROLL) OBJTYPE(*MODULE)
|
|
TEXT('Payroll Program')
|
|
</pre>
|
|
</p>
|
|
<p>This command runs the SQL precompiler which precompiles the C source and stores the changed source in member PAYROLL of source file QSQLTEMP in library QTEMP. The ILE C compiler is called to create module PAYROLL in the current library by using the source member created by the SQL precompiler.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CRTSQLCI.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>SQL9001</b></dt>
|
|
<dd>SQL precompile failed.
|
|
</dd>
|
|
<dt><b>SQL9002</b></dt>
|
|
<dd>Conflict in TGTRLS parameters for SQL precompile and &7 compile.
|
|
</dd>
|
|
<dt><b>SQL9003</b></dt>
|
|
<dd>&7 Compile at wrong level for SQL source.
|
|
</dd>
|
|
<dt><b>SQL9004</b></dt>
|
|
<dd>Create of SQL package failed.
|
|
</dd>
|
|
<dt><b>SQL9006</b></dt>
|
|
<dd>DB2 UDB Query Manager and SQL Development Kit for iSeries not at same install level as i5/OS.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CRTSQLCI.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|