110 lines
8.0 KiB
HTML
110 lines
8.0 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="Compile an ILE application program that uses SQL" />
|
|
<meta name="abstract" content="The SQL precompiler automatically calls the host language compiler after the successful completion of a precompile for the CRTSQLxxx commands, unless *NOGEN is specified." />
|
|
<meta name="description" content="The SQL precompiler automatically calls the host language compiler after the successful completion of a precompile for the CRTSQLxxx commands, unless *NOGEN is specified." />
|
|
<meta name="DC.subject" content="precompiler parameter, OPTION(*NOGEN), OBJTYPE(*PGM), OBJTYPE(*MODULE), OBJTYPE(*SRVPGM)" />
|
|
<meta name="keywords" content="precompiler parameter, OPTION(*NOGEN), OBJTYPE(*PGM), OBJTYPE(*MODULE), OBJTYPE(*SRVPGM)" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpilesqlprecompile.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="rzajpcompileile" />
|
|
<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>Compile an ILE application program that uses SQL</title>
|
|
</head>
|
|
<body id="rzajpcompileile"><a name="rzajpcompileile"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Compile an ILE application program that uses SQL</h1>
|
|
<div><p>The SQL precompiler automatically calls the host language compiler
|
|
after the successful completion of a precompile for the <span class="cmdname">CRTSQLxxx</span> commands,
|
|
unless *NOGEN is specified.</p>
|
|
<div class="section"><p>If the *MODULE option is specified, the SQL precompiler issues
|
|
the <span class="cmdname">CRTxxxMOD</span> command to create the module. If the *PGM
|
|
option is specified, the SQL precompiler issues the <span class="cmdname">CRTBNDxxx</span> command
|
|
to create the program. If the *SRVPGM option is specified, the SQL precompiler
|
|
issues the <span class="cmdname">CRTxxxMOD</span> command to create the module, followed
|
|
by the <span class="cmdname">Create Service Program (CRTSRVPGM)</span> command to create
|
|
the service program. The <span class="cmdname">CRTSQLCPPI</span> command only creates
|
|
*MODULE objects.</p>
|
|
</div>
|
|
<div class="section"><p>Within these languages, the following parameters are passed:</p>
|
|
<ul><li>If DBGVIEW(*SOURCE) is specified on the <span class="cmdname">CRTSQLxxx</span> command,
|
|
then DBGVIEW(*ALL) is specified on both the <span class="cmdname">CRTxxxMOD</span> and <span class="cmdname">CRTBNDxxx</span> commands.</li>
|
|
<li>If OUTPUT(*PRINT) is specified on the <span class="cmdname">CRTSQLxxx</span> command,
|
|
it is passed on both the <span class="cmdname">CRTxxxMOD</span> and <span class="cmdname">CRTBNDxxx</span> commands.
|
|
<p>If OUTPUT(*NONE) is specified on the <span class="cmdname">CRTSQLxxx</span> command,
|
|
it is not specified on either the <span class="cmdname">CRTxxxMOD</span> command or
|
|
the <span class="cmdname">CRTBNDxxx</span> command.</p>
|
|
</li>
|
|
<li>The TGTRLS parameter value from the <span class="cmdname">CRTSQLxxx</span> command
|
|
is specified on the <span class="cmdname">CRTxxxMOD</span>, <span class="cmdname">CRTBNDxxx</span>,
|
|
and <span class="cmdname">Create Service Program (CRTSRVPGM)</span> commands.</li>
|
|
<li>The REPLACE parameter value from the <span class="cmdname">CRTSQLxxx</span> command
|
|
is specified on the <span class="cmdname">CRTxxxMOD</span>, <span class="cmdname">CRTBNDxxx</span>,
|
|
and <span class="cmdname">CRTSRVPGM</span> commands. <p>If a package is created as
|
|
part of the precompile process, the REPLACE parameter value from the <span class="cmdname">CRTSQLxxx</span> command
|
|
is specified on the <span class="cmdname">CRTSQLPKG</span> command.</p>
|
|
</li>
|
|
<li>If OBJTYPE is either *PGM or *SRVPGM, and USRPRF(*USER) or system naming
|
|
(*SYS) with USRPRF(*NAMING) is specified, USRPRF(*USER) is specified on the <span class="cmdname">CRTBNDxxx</span> or
|
|
the <span class="cmdname">CRTSRVPGM</span> commands. <p>If OBJTYPE is either *PGM or
|
|
*SRVPGM, and USRPRF(*OWNER) or SQL naming (*SQL) with USRPRF(*NAMING) is specified,
|
|
USRPRF(*OWNER) is specified on the <span class="cmdname">CRTBNDxxx</span> or the <span class="cmdname">CRTSRVPGM</span> commands.</p>
|
|
</li>
|
|
<li>For C and C++, the MARGINS are set in the temporary source file. <p>If
|
|
the precompiler calculates that the total length of the LOB host variables
|
|
is close to 15M, the TERASPACE( *YES *TSIFC) option is specified on the <span class="cmdname">CRTCMOD</span>, <span class="cmdname">CRTBNDC</span>,
|
|
or <span class="cmdname">CRTCPPMOD</span> commands.</p>
|
|
</li>
|
|
<li>For COBOL, the *QUOTE or *APOST is passed on the <span class="cmdname">CRTBNDCBL</span> or
|
|
the <span class="cmdname">CRTCBLMOD</span> commands.</li>
|
|
<li>FOR RPG and COBOL, the SRTSEQ and LANGID parameter from the <span class="cmdname">CRTSQLxxx</span> command
|
|
is specified on the <span class="cmdname">CRTxxxMOD</span> and <span class="cmdname">CRTBNDxxx</span> commands.</li>
|
|
<li>For COBOL, CVTOPT(*VARCHAR *DATETIME *PICGGRAPHIC *FLOAT) is always specified
|
|
on the <span class="cmdname">CRTCBLMOD</span> and <span class="cmdname">CRTBNDCBL</span> commands.
|
|
If OPTION(*NOCVTDT) is specified (the shipped command default), the additional
|
|
options *DATE *TIME *TIMESTAMP are also specified for the CVTOPT.</li>
|
|
<li>For RPG, if OPTION(*CVTDT) is specified, then CVTOPT(*DATETIME) is specified
|
|
on the <span class="cmdname">CRTRPGMOD</span> and <span class="cmdname">CRTBNDRPG</span> commands.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>You can interrupt the call to the host language compiler by specifying
|
|
*NOGEN on the OPTION parameter of the precompiler command. *NOGEN specifies
|
|
that the host language compiler is not called. Using the specified program
|
|
name in the <span class="cmdname">CRTSQLxxx</span> command as the member name, the precompiler
|
|
creates the source member in the output source file (TOSRCFILE parameter).
|
|
You can now explicitly call the host language compiler, specify the source
|
|
member in the output source file, and change the defaults. If the precompile
|
|
and compile were done as separate steps, the <span class="cmdname">CRTSQLPKG</span> command
|
|
can be used to create the SQL package for a distributed program.</p>
|
|
</div>
|
|
<div class="section"><p>If the program or service program is created later, the USRPRF
|
|
parameter may not be set correctly on the <span class="cmdname">CRTBNDxxx</span>, <span class="cmdname">Create
|
|
Program (CRTPGM)</span>, or <span class="cmdname">Create Service Program (CRTSRVPGM)</span> command.
|
|
The SQL program runs predictably only after the USRPRF parameter is corrected.
|
|
If system naming is used, then the USRPRF parameter must be set to *USER.
|
|
If SQL naming is used, then the USRPRF parameter must be set to *OWNER.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpilesqlprecompile.htm" title="In the DB2 UDB Query Manager and SQL Development Kit, the following ILE precompiler commands exist: CRTSQLCI, CRTSQLCPPI, CRTSQLCBLI, and CRTSQLRPGI.">ILE SQL precompiler commands</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |