ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzajp_5.4.0.1/rzajprexx.htm

84 lines
6.8 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?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="Code SQL statements in REXX applications" />
<meta name="abstract" content="REXX procedures do not have to be preprocessed. At run time, the REXX interpreter passes statements that it does not understand to the current active command environment for processing." />
<meta name="description" content="REXX procedures do not have to be preprocessed. At run time, the REXX interpreter passes statements that it does not understand to the current active command environment for processing." />
<meta name="DC.subject" content="REXX, coding SQL statements, application procedure, in REXX applications, EXECSQL REXX command" />
<meta name="keywords" content="REXX, coding SQL statements, application procedure, in REXX applications, EXECSQL REXX command" />
<meta name="DC.Relation" scheme="URI" content="rzajpkickoff.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpcodpl.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajprsqlda.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpembedsqlrexx.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajphostvariablesrexx.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpinvar.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpwritesqlapp.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpwhen.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpssrexx.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajperrorandwarning.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="rzajprexx" />
<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>Code SQL statements in REXX applications</title>
</head>
<body id="rzajprexx"><a name="rzajprexx"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Code SQL statements in REXX applications</h1>
<div><p>REXX procedures do not have to be preprocessed. At run time,
the REXX interpreter passes statements that it does not understand to the
current active command environment for processing.</p>
<p>The command environment can be changed to *EXECSQL to send all unknown
statements to the database manager in two ways: </p>
<ol><li>CMDENV parameter on the STRREXPRC CL command</li>
<li>address positional parameter on the ADDRESS REXX command</li>
</ol>
<p>For more information about the <span class="cmdname">STRREXPRC</span> CL command
or the <span class="cmdname">ADDRESS REXX</span> command, see the <a href="../books/sc415728.pdf" target="_blank">REXX/400 Programmer's Guide</a><img src="wbpdf.gif" alt="Link to PDF" /> topic and the <a href="../books/sc415729.pdf" target="_blank">REXX/400 Reference</a><img src="wbpdf.gif" alt="Link to PDF" /> topic.</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="rzajpcodpl.htm">Use the SQL communications area in REXX applications</a></strong><br />
The fields that make up the SQL Communications Area (SQLCA) are automatically included by the SQL/REXX interface.</li>
<li class="ulchildlink"><strong><a href="rzajprsqlda.htm">Use SQL descriptor areas in REXX applications</a></strong><br />
<span><img src="./delta.gif" alt="Start of change" />There are two types of SQL descriptor
areas. One is defined with the ALLOCATE DESCRIPTOR statement. The other is
defined using the SQL descriptor area (SQLDA) structure. Only the SQLDA form
is discussed here. Allocated descriptors are not supported in REXX.<img src="./deltaend.gif" alt="End of change" /></span></li>
<li class="ulchildlink"><strong><a href="rzajpembedsqlrexx.htm">Embed SQL statements in REXX applications</a></strong><br />
An SQL statement can be placed anywhere a REXX command can be placed.</li>
<li class="ulchildlink"><strong><a href="rzajphostvariablesrexx.htm">Use host variables in REXX applications that use SQL</a></strong><br />
REXX does not provide for variable declarations.</li>
<li class="ulchildlink"><strong><a href="rzajpinvar.htm">Use indicator variables in REXX applications that use SQL</a></strong><br />
An indicator variable is an integer.</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><a href="rzajperrorandwarning.htm" title="The conditions described in the following topics could produce an error or warning message during an attempted compile process.">Error and warning messages during a compile of application programs that use SQL</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzajpwhen.htm" title="The WHENEVER statement causes SQL to check the SQLSTATE and SQLCODE and continue processing your program, or branch to another area in your program if an error, exception, or warning exists as a result of running an SQL statement.">Handle exception conditions with the WHENEVER Statement</a></div>
<div><a href="rzajpssrexx.htm" title="This sample program is written in the REXX programming language.">Example: SQL statements in REXX programs</a></div>
</div>
</div>
</body>
</html>