89 lines
5.9 KiB
HTML
89 lines
5.9 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="Input to the SQL precompiler" />
|
|
<meta name="abstract" content="Application programming statements and embedded SQL statements are the primary input to the SQL precompiler." />
|
|
<meta name="description" content="Application programming statements and embedded SQL statements are the primary input to the SQL precompiler." />
|
|
<meta name="DC.subject" content="precompiler, input to, source file, margins, input to precompiler, precompiler parameter, MARGINS, INCFILE, secondary input, include files, include file, input to precompiler, INCLUDE statement, other preprocessors, preprocessor, with SQL, DBCS constants, in SQL source, containing DBCS constants" />
|
|
<meta name="keywords" content="precompiler, input to, source file, margins, input to precompiler, precompiler parameter, MARGINS, INCFILE, secondary input, include files, include file, input to precompiler, INCLUDE statement, other preprocessors, preprocessor, with SQL, DBCS constants, in SQL source, containing DBCS constants" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpprecomp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstsoption.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/crtsqlrpgi.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="rzajpinputcompile" />
|
|
<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>Input to the SQL precompiler</title>
|
|
</head>
|
|
<body id="rzajpinputcompile"><a name="rzajpinputcompile"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Input to the SQL precompiler</h1>
|
|
<div><p>Application programming statements and embedded SQL statements
|
|
are the primary input to the SQL precompiler.</p>
|
|
<div class="section"><p>In PL/I, C, and C++ programs, the SQL statements must use the
|
|
margins that are specified in the MARGINS parameter of the <span class="cmdname">CRTSQLPLI</span>, <span class="cmdname">CRTSQLCI</span>,
|
|
and <span class="cmdname">CRTSQLCPPI</span> commands.</p>
|
|
</div>
|
|
<div class="section"><p>The SQL precompiler assumes that the host language statements
|
|
are syntactically correct. If the host language statements are not syntactically
|
|
correct, the precompiler may not correctly identify SQL statements and host
|
|
variable declarations. There are limits on the forms of source statements
|
|
that can be passed through the precompiler. Literals and comments that are
|
|
not accepted by the application language compiler, can interfere with the
|
|
precompiler source scanning process and cause errors.</p>
|
|
</div>
|
|
<div class="section"><p>You can use the SQL INCLUDE statement to get secondary input from
|
|
the file that is specified by the INCFILE parameter of the CRTSQLxxx. The
|
|
xxx in this command refers to the host language indicators: CBL for the COBOL
|
|
for <span class="keyword">iSeries™</span> language, CBLI
|
|
for the ILE COBOL for <span class="keyword">iSeries</span> language,
|
|
PLI for the <span class="keyword">iSeries</span> PL/I language,
|
|
CI for the ILE C for <span class="keyword">iSeries</span> language,
|
|
RPG for the RPG/400<sup>®</sup> language,
|
|
RPGI for the ILE RPG language, CPPI for the ILE C++/400 language. The SQL
|
|
INCLUDE statement causes input to be read from the specified member until
|
|
it reaches the end of the member. The included member may not contain other
|
|
precompiler INCLUDE statements, but can contain both application program and
|
|
SQL statements. </p>
|
|
</div>
|
|
<div class="section"><p>If mixed DBCS constants are specified in the application program
|
|
source, the source file must be a mixed CCSID.</p>
|
|
</div>
|
|
<div class="section"><p>You can specify many of the precompiler options in the input source
|
|
member by using the SQL SET OPTION statement.</p>
|
|
</div>
|
|
<div class="section"><p>The RPG preprocessor options (RPGPPORT) parameter of the <span class="cmdname">CRTSQLRPGI</span> command
|
|
has two options to call the RPG preprocessor. If *LVL1 or *LVL2 is specified,
|
|
the RPG compiler will be called to preprocess the source member before the
|
|
SQL precompile is run. Preprocessing the SQL source member will allow many
|
|
compiler directives to be handled before the SQL precompile. The preprocessed
|
|
source will be placed in file QSQLPRE in QTEMP. This source will be used as
|
|
the input for the SQL precompile. The CCSID used by the SQL precompile is
|
|
the CCSID of QSQLPRE.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpprecomp.htm" title="You must precompile and compile an application program containing embedded SQL statements before you can run it.">Basic processes of the SQL precompiler</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../db2/rbafzmstsoption.htm">SET OPTION</a></div>
|
|
<div><a href="../cl/crtsqlrpgi.htm">CRTSQLRPGI command</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |