ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/crtsqlcbl.htm

1379 lines
57 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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 COBOL Program (CRTSQLCBL)</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="CRTSQLCBL.Top_Of_Page"></a>
<h2>Create SQL COBOL Program (CRTSQLCBL)</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="#CRTSQLCBL.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CRTSQLCBL.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CRTSQLCBL.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CRTSQLCBL"></a>
<p>The Create SQL COBOL Program (CRTSQLCBL) command calls the Structured Query Language (SQL) precompiler which precompiles COBOL source containing SQL statements, produces a temporary source member, and then optionally calls the COBOL for iSeries compiler to compile the program.
</p>
<p>If the <b>Relational database (RDB)</b> parameter is specified and a program is created, an SQL package will be created at the specified relational database.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CRTSQLCBL.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="#CRTSQLCBL.PGM"><b>PGM</b></a></td>
<td valign="top">Program</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: Program</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="#CRTSQLCBL.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>QLBLSRC</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="#CRTSQLCBL.SRCMBR"><b>SRCMBR</b></a></td>
<td valign="top">Source member</td>
<td valign="top"><i>Name</i>, <b><u>*PGM</u></b></td>
<td valign="top">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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>, '&nbsp;'</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.OPTION"><b>OPTION</b></a></td>
<td valign="top">Precompiler options</td>
<td valign="top">Values (up to 18 repetitions): <b><u>*NOSRC</u></b>, *NOSOURCE, *SRC, *SOURCE, *XREF, *NOXREF, *GEN, *NOGEN, *COMMA, *PERIOD, *JOB, *SYSVAL, *QUOTESQL, *APOSTSQL, *QUOTE, *APOST, *SECLVL, *NOSECLVL, *LSTDBG, *NOLSTDBG, *SQL, *SYS</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.CLOSQLCSR"><b>CLOSQLCSR</b></a></td>
<td valign="top">Close SQL cursor</td>
<td valign="top"><b><u>*ENDPGM</u></b>, *ENDSQL, *ENDJOB</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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"><a href="#CRTSQLCBL.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="#CRTSQLCBL.DATSEP"><b>DATSEP</b></a></td>
<td valign="top">Date separator character</td>
<td valign="top"><b><u>*JOB</u></b>, '/', '.', ',', '-', '&nbsp;', *BLANK</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.TIMSEP"><b>TIMSEP</b></a></td>
<td valign="top">Time separator character</td>
<td valign="top"><b><u>*JOB</u></b>, ':', '.', ',', '&nbsp;', *BLANK</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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>*PGM</u></b></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*PGMLIB</u></b></td>
</tr><tr>
<td valign="top"><a href="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.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>QSQLTEMP</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="#CRTSQLCBL.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="#CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CRTSQLCBL.PGM"></a>
<h3>Program (PGM)</h3>
<p>Specifies the program to be created.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 1: Program</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the program to be created.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*CURLIB</u></b></dt>
<dd>The current library for the job is used to locate the compiled program. If no current library entry exists in the library list, QGPL is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the compiled program is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.SRCFILE"></a>
<h3>Source file (SRCFILE)</h3>
<p>Specifies the source file that contains the COBOL source statements and SQL statements.
</p>
<p><b>Qualifier 1: Source file</b>
</p>
<dl>
<dt><b><u>QLBLSRC</u></b></dt>
<dd>Source file QLBLSRC contains the COBOL source.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the source file that contains the COBOL source. This source file should have a record length of 92. 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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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>*PGM</u></b></dt>
<dd>The source file member that has the same name as the program name specified for the <b>Program (PGM)</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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.OPTION"></a>
<h3>Precompiler options (OPTION)</h3>
<p>Specifies whether the following options are used when the COBOL 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>Source listing</b> options:
</p>
<dl>
<dt><b><u>*NOSRC</u> <i>or</i> <u>*NOSOURCE</u></b></dt>
<dd>The precompiler does not produce a source printout unless errors are detected during precompile or create package.
</dd>
<dt><b>*SRC <i>or</i> *SOURCE</b></dt>
<dd>The precompiler produces a source printout.
</dd>
</dl>
<p><b>Cross reference</b> options:
</p>
<dl>
<dt><b><u>*NOXREF</u></b></dt>
<dd>The precompiler does not produce a cross-reference of names.
</dd>
<dt><b>*XREF</b></dt>
<dd>The precompiler produces a cross-reference between items declared in your program and the numbers of the statements in your program that refer to these items.
</dd>
</dl>
<p><b>Host language compiler call</b> options:
</p>
<dl>
<dt><b><u>*GEN</u></b></dt>
<dd>The precompiler calls the COBOL compiler. If a relational database name is specified for the <b>Relational database (RDB)</b> parameter, and the compile is successful, an SQL package is also created.
</dd>
<dt><b>*NOGEN</b></dt>
<dd>The precompiler does not call the COBOL compiler. Neither a program nor an SQL package is created.
</dd>
</dl>
<p><b>SQL string delimiter</b> options:
</p>
<dl>
<dt><b><u>*QUOTESQL</u></b></dt>
<dd>The character used as the string delimiter in the SQL statements is the quote (").
</dd>
<dt><b>*APOSTSQL</b></dt>
<dd>The character used as the string delimiter in the SQL statements is the apostrophe (').
</dd>
</dl>
<p><b>COBOL string delimiter</b> options:
</p>
<dl>
<dt><b><u>*QUOTE</u></b></dt>
<dd>The character used for nonnumeric literals and Boolean literals in the COBOL statements is the quote (").
</dd>
<dt><b>*APOST</b></dt>
<dd>The character used for nonnumeric literals and Boolean literals in the COBOL statements is the apostrophe (').
</dd>
</dl>
<p><b>Decimal point</b> options:
</p>
<dl>
<dt><b><u>*JOB</u></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 and 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 the period.
</p>
</dd>
<dt><b>*SYSVAL</b></dt>
<dd>The value used as the decimal point in numeric constants is from the QDECFMT system value. This value is also used as the decimal point character when casting a numeric value to character.
<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 and 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 the period.
</p>
</dd>
<dt><b>*PERIOD</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>*COMMA</b></dt>
<dd>The value used as the decimal point in numeric constants is a comma. Any numeric constants in lists (such as in the SELECT clause and 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 the period.
</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>Debug listing view</b> options:
</p>
<dl>
<dt><b><u>*NOLSTDBG</u></b></dt>
<dd>Error and debug information is not generated.
</dd>
<dt><b>*LSTDBG</b></dt>
<dd>The SQL precompiler generates a listing view and error and debug information required for this view.
<p>
<b>Note: </b>You can only use *LSTDBG if you are using the CODE product to compile your program.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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 released. SQL cursors are explicitly closed by issuing the CLOSE, COMMIT (without HOLD), ROLLBACK (without HOLD), or CONNECT (Type 1) SQL statements.
</p>
<dl>
<dt><b><u>*ENDPGM</u></b></dt>
<dd>The 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><b>*ENDSQL</b></dt>
<dd>The SQL cursors remain open between calls and rows can be fetched without running another SQL OPEN statement. One of the programs higher on the call stack must have run at least one SQL statement. The 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 you specify *ENDSQL 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><b>*ENDJOB</b></dt>
<dd>SQL cursors remain open between calls and can be fetched without running another SQL OPEN statement. 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>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.REPLACE"></a>
<h3>Replace (REPLACE)</h3>
<p>Specifies whether a SQL program or SQL package is created when there is an existing SQL program or SQL package of the same name in the same library. The value is passed to the CRTxxxPGM command (where xxx is the language of the program being created) and the Create SQL Package (CRTSQLPKG) command if the RDB parameter is specified.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>An SQL program or SQL package is created and any existing SQL program or SQL package of the same name in the specified library is moved to QRPLOBJ. The authorities for the existing SQL package are kept for the new SQL package.
</dd>
<dt><b>*NO</b></dt>
<dd>An SQL program or package is not created if an SQL program or package of the same name already exists in the specified library.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.SQLPKG"></a>
<h3>Package (SQLPKG)</h3>
<p>Specifies the name and library of the SQL package to be created on the remote relational database specified for the <b>Relational database (RDB)</b> parameter of this command.
</p>
<p><b>Qualifier 1: Package</b>
</p>
<dl>
<dt><b><u>*PGM</u></b></dt>
<dd>The name of the SQL package is the same as the program name.
</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, a maximum of 8 characters can be specified.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*PGMLIB</u></b></dt>
<dd>The SQL package is placed in the schema that has the same name as the library containing the program.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the schema where the SQL package is to be placed. If the remote system is not an iSeries system, a maximum of 8 characters can be specified.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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>QSQLTEMP</u></b></dt>
<dd>The source file QSQLTEMP will be used.
</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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTSQLCBL.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. 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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTSQLCBL.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
CRTSQLCBL PGM(ACCTS/STATS) SRCFILE(ACCTS/ACTIVE)
TEXT('Statistical analysis of active accounts')
</pre>
</p>
<p>This command runs the SQL precompiler which precompiles the COBOL source and stores the changed source in member STATS of source file QSQLTEMP in library QTEMP. The COBOL compiler is called to create program STATS in library ACCTS using the source member created by the SQL precompiler.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTSQLCBL.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 &amp;7 compile.
</dd>
<dt><b>SQL9003</b></dt>
<dd>&amp;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="#CRTSQLCBL.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>