84 lines
6.7 KiB
HTML
84 lines
6.7 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="concept" />
|
|
<meta name="DC.Title" content="Prepare and run a program with SQL statements" />
|
|
<meta name="abstract" content="This topic describes some of the tasks for preparing and running an application program." />
|
|
<meta name="description" content="This topic describes some of the tasks for preparing and running an application program." />
|
|
<meta name="DC.subject" content="preparing program with SQL statements, program, preparing and running with SQL statements, statements, preparing and running a program with" />
|
|
<meta name="keywords" content="preparing program with SQL statements, program, preparing and running with SQL statements, statements, preparing and running a program with" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpkickoff.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpprecomp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpprcpcmd.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpilesqlprecompile.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpifsprecomp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpinterpreterrors.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpbind.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpdisplayoptions.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajprunningpgm.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpwritesqlapp.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="rzajppreprog" />
|
|
<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>Prepare and run a program with SQL statements</title>
|
|
</head>
|
|
<body id="rzajppreprog"><a name="rzajppreprog"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Prepare and run a program with SQL statements</h1>
|
|
<div><p>This topic describes some of the tasks for preparing and running
|
|
an application program.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rzajpprecomp.htm">Basic processes of the SQL precompiler</a></strong><br />
|
|
You must precompile and compile an application program containing embedded SQL statements before you can run it.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajpprcpcmd.htm">Non-ILE SQL precompiler commands</a></strong><br />
|
|
<span class="keyword">DB2<sup>®</sup> UDB Query Manager and SQL Development Kit</span> includes
|
|
non-ILE precompiler commands for the following host languages: <span class="cmdname">CRTSQLCBL</span> (for
|
|
COBOL for <span class="keyword">iSeries™</span>), <span class="cmdname">CRTSQLPLI</span> (for <span class="keyword">iSeries™</span> PL/I), and <span class="cmdname">CRTSQLRPG</span> (for
|
|
RPG III, which is part of RPG/400<sup>®</sup>).</li>
|
|
<li class="ulchildlink"><strong><a href="rzajpilesqlprecompile.htm">ILE SQL precompiler commands</a></strong><br />
|
|
In the <span class="keyword">DB2<sup>®</sup> UDB Query Manager and SQL Development Kit</span>,
|
|
the following ILE precompiler commands exist: <span class="cmdname">CRTSQLCI</span>, <span class="cmdname">CRTSQLCPPI</span>, <span class="cmdname">CRTSQLCBLI</span>,
|
|
and <span class="cmdname">CRTSQLRPGI</span>. </li>
|
|
<li class="ulchildlink"><strong><a href="rzajpifsprecomp.htm">Set compiler options using the precompiler commands</a></strong><br />
|
|
The COMPILEOPT string is available on the precompiler command and on the SET OPTION statement to allow additional parameters to be used on the compiler command.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajpinterpreterrors.htm">Interpret compile errors in applications that use SQL</a></strong><br />
|
|
Sometimes you will encounter compile errors. Use the following information to interpret these errors.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajpbind.htm">Bind an application that uses SQL</a></strong><br />
|
|
Before you can run your application program, a relationship between
|
|
the program and any specified tables and views must be established. This process
|
|
is called <em>binding</em>. The result of binding is an <em>access plan</em>.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajpdisplayoptions.htm">Display SQL precompiler options</a></strong><br />
|
|
When the SQL application program is successfully compiled, the<span class="cmdname"> Display
|
|
Module (DSPMOD)</span>, the <span class="cmdname">Display Program (DSPPGM)</span>,
|
|
or the <span class="cmdname">Display Service Program (DSPSRVPGM)</span> command can
|
|
be used to determine some of the options that were specified on the SQL precompile.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajprunningpgm.htm">Run a program with embedded SQL</a></strong><br />
|
|
Running a host language program with embedded SQL statements, after the precompile and compile have been successfully done, is the same as running any host program.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpkickoff.htm" title="This topic collection explains how to create database applications in host languages that use DB2 Universal Database for iSeries SQL statements and functions.">Embedded SQL programming</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="rzajpwritesqlapp.htm" title="You can create database applications in host languages that use DB2 UDB for iSeries SQL statements and functions.">Write applications that use SQL</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |