126 lines
10 KiB
HTML
126 lines
10 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Precompiler commands" />
|
|
<meta name="abstract" content="The DB2 UDB Query Manager and SQL Development Kit licensed program has seven precompiler commands, one for each of the host languages." />
|
|
<meta name="description" content="The DB2 UDB Query Manager and SQL Development Kit licensed program has seven precompiler commands, one for each of the host languages." />
|
|
<meta name="DC.subject" content="application program, precompiler commands, precompile process, commands, command, CRTSQLPLI (Create Structured Query Language PL/I), Create Structured Query Language PL/I (CRTSQLPLI), CRTSQLCI (Create Structured Query Language C ILE), Create Structured Query Language C ILE (CRTSQLCI), CRTSQLCBL (Create Structured Query Language COBOL), Create Structured Query Language COBOL (CRTSQLCBL), CRTSQLRPG (Create Structured Query Language RPG), Create Structured Query Language RPG (CRTSQLRPG), CRTSQLCBLI (Create Structured Query Language COBOL ILE), Create Structured Query Language COBOL ILE (CRTSQLCBLI), CRTSQLRPGI (Create Structured Query Language RPG ILE), Create Structured Query Language RPG ILE (CRTSQLRPGI), CRTSQLFTN (Create Structured Query Language FORTRAN), Create Structured Query Language FORTRAN (CRTSQLFTN), command, CL, CRTSQLPLI (Create Structured Query Language PL/I), Create Structured Query Language PL/I (CRTSQLPLI), CRTSQLC (Create Structured Query Language C), Create Structured Query Language C (CRTSQLC), CRTSQLCBLI (Create Structured Query Language COBOL ILE), Create Structured Query Language COBOL ILE (CRTSQLCBLI), CRTSQLRPGI (Create Structured Query Language RPG ILE), Create Structured Query Language RPG ILE (CRTSQLRPGI), CRTSQLRPG (Create Structured Query Language RPG), Create Structured Query Language RPG (CRTSQLRPG), CRTSQLFTN (Create Structured Query Language FORTRAN), Create Structured Query Language FORTRAN (CRTSQLFTN), precompiler command, CRTSQLPLI (Create Structured Query Language PL/I), command, precompiler" />
|
|
<meta name="keywords" content="application program, precompiler commands, precompile process, commands, command, CRTSQLPLI (Create Structured Query Language PL/I), Create Structured Query Language PL/I (CRTSQLPLI), CRTSQLCI (Create Structured Query Language C ILE), Create Structured Query Language C ILE (CRTSQLCI), CRTSQLCBL (Create Structured Query Language COBOL), Create Structured Query Language COBOL (CRTSQLCBL), CRTSQLRPG (Create Structured Query Language RPG), Create Structured Query Language RPG (CRTSQLRPG), CRTSQLCBLI (Create Structured Query Language COBOL ILE), Create Structured Query Language COBOL ILE (CRTSQLCBLI), CRTSQLRPGI (Create Structured Query Language RPG ILE), Create Structured Query Language RPG ILE (CRTSQLRPGI), CRTSQLFTN (Create Structured Query Language FORTRAN), Create Structured Query Language FORTRAN (CRTSQLFTN), command, CL, CRTSQLPLI (Create Structured Query Language PL/I), Create Structured Query Language PL/I (CRTSQLPLI), CRTSQLC (Create Structured Query Language C), Create Structured Query Language C (CRTSQLC), CRTSQLCBLI (Create Structured Query Language COBOL ILE), Create Structured Query Language COBOL ILE (CRTSQLCBLI), CRTSQLRPGI (Create Structured Query Language RPG ILE), Create Structured Query Language RPG ILE (CRTSQLRPGI), CRTSQLRPG (Create Structured Query Language RPG), Create Structured Query Language RPG (CRTSQLRPG), CRTSQLFTN (Create Structured Query Language FORTRAN), Create Structured Query Language FORTRAN (CRTSQLFTN), precompiler command, CRTSQLPLI (Create Structured Query Language PL/I), command, precompiler" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal1precsql.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/crtsqlpkg.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbal1prcpcmd" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Precompiler commands</title>
|
|
</head>
|
|
<body id="rbal1prcpcmd"><a name="rbal1prcpcmd"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Precompiler commands</h1>
|
|
<div><p>The <span class="keyword">DB2<sup>®</sup> UDB Query Manager and SQL Development Kit</span> licensed
|
|
program has seven precompiler commands, one for each of the host languages.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th valign="top" width="50%" id="d0e229">Host language</th>
|
|
<th valign="top" width="50%" id="d0e231">Command</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="50%" headers="d0e229 "><span class="keyword">iSeries™</span> PL/I</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLPLI</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">ILE C/400<sup>®</sup> language</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLCI</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">COBOL/400<sup>®</sup> language</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLCBL</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">ILE COBOL/400 language</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLCBLI</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">FORTRAN/400 language</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLFTN</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">RPG III (part of RPG/400<sup>®</sup> language)</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLRPG</span></td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e229 ">ILE RPG/400 language</td>
|
|
<td valign="top" width="50%" headers="d0e231 "><span class="cmdname">CRTSQLRPGI</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section"><p>A separate command for each language exists so each language can
|
|
have parameters that apply only to that language. For example, the options
|
|
*APOST and *QUOTE are unique to COBOL. They are not included in the commands
|
|
for the other languages. The precompiler is controlled by parameters specified
|
|
when it is called by one of the SQL precompiler commands. The parameters specify
|
|
how the input is processed and how the output is presented.</p>
|
|
</div>
|
|
<div class="section"><p>You can precompile a program without specifying anything more
|
|
than the name of the member containing the program source statements as the
|
|
PGM parameter (for non-ILE precompiles) or the OBJ parameter (for ILE precompiles)
|
|
of the CRTSQL<em>xxx</em> command. SQL assigns default values for all precompiler
|
|
parameters (which might, however, be overridden by any that you explicitly
|
|
specify).</p>
|
|
</div>
|
|
<div class="section"><div class="p">The following list briefly describes parameters common to all
|
|
the CRTSQLxxx commands that are used to support distributed relational database.
|
|
<dl><dt class="dlterm">RDB</dt>
|
|
<dd>Specifies the name of the relational database where the SQL package option
|
|
is to be created. If *NONE is specified, then the program or module is not
|
|
a distributed object and the <span class="cmdname">Create Structured Query Language Package
|
|
(CRTSQLPKG)</span> command cannot be used. The relational database name
|
|
can be the name of the local database.</dd>
|
|
<dt class="dlterm">RDBCNNMTH</dt>
|
|
<dd>Specifies the type of semantics to be used for CONNECT statements: remote
|
|
unit of work (RUW) or distributed unit of work (DUW) semantics.</dd>
|
|
<dt class="dlterm">SQLPKG</dt>
|
|
<dd>Specifies the name and library of the SQL package.</dd>
|
|
<dt class="dlterm">USER</dt>
|
|
<dd>Specifies the user name sent to the remote server when starting the conversation.
|
|
This parameter is used only if a conversation is started as part of the precompile
|
|
process.</dd>
|
|
<dt class="dlterm">PASSWORD</dt>
|
|
<dd>Specifies the password to be used on the remote server when starting the
|
|
conversation. This parameter is used only if a conversation is started as
|
|
part of the precompile process.</dd>
|
|
<dt class="dlterm">REPLACE</dt>
|
|
<dd>Specifies if any objects created as part of the precompile process should
|
|
be able to replace an existing object.</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="section"><p>The following example creates a COBOL program named INVENT and
|
|
stores it in a library named SPIFFY. The SQL naming convention is selected,
|
|
and every row selected from a specified table is locked until the end of the
|
|
unit of recovery. An SQL package with the same name as the program is created
|
|
on the remote relational database named KC000.</p>
|
|
</div>
|
|
<div class="section"><pre>CRTSQLCBL PGM(SPIFFY/INVENT) OPTION(*SRC *XREF *SQL)
|
|
COMMIT(*ALL) RDB(KC000)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1precsql.htm" title="You must precompile and compile an application program containing embedded SQL statements before you can run it. Precompiling such programs is done by an SQL precompiler.">Precompile programs with SQL statements</a></div>
|
|
</div>
|
|
<div class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="../cl/crtsqlpkg.htm">Create Structured Query Language Package (CRTSQLPKG) command</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |