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

86 lines
5.8 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="Define the SQL communications area in RPG/400 applications that use SQL" />
<meta name="abstract" content="The SQL precompiler automatically places the SQLCA in the input specifications of the RPG/400 program prior to the first calculation specification." />
<meta name="description" content="The SQL precompiler automatically places the SQLCA in the input specifications of the RPG/400 program prior to the first calculation specification." />
<meta name="DC.subject" content="application program, SQLCA (SQL communication area), RPG/400, SQLCA (SQL communication area), RPG/400 program, SQLCA, placement" />
<meta name="keywords" content="application program, SQLCA (SQL communication area), RPG/400, SQLCA (SQL communication area), RPG/400 program, SQLCA, placement" />
<meta name="DC.Relation" scheme="URI" content="rzajprpg.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstsqlcca.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="rzajpsqlcarpg" />
<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>Define the SQL communications area in RPG/400 applications that use SQL</title>
</head>
<body id="rzajpsqlcarpg"><a name="rzajpsqlcarpg"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Define the SQL communications area in RPG/400 applications that use SQL</h1>
<div><p>The SQL precompiler automatically places the SQLCA in the input
specifications of the RPG/400<sup>®</sup> program prior to the first calculation specification. </p>
<div class="section"><p>INCLUDE SQLCA should not be coded in the source program. If the
source program specifies INCLUDE SQLCA, the statement will be accepted, but
it is redundant. The SQLCA, as defined for RPG/400:</p>
<pre>ISQLCA DS SQL
I* SQL Communications area SQL
I 1 8 SQLAID SQL
I B 9 120SQLABC SQL
I B 13 160SQLCOD SQL
I B 17 180SQLERL SQL
I 19 88 SQLERM SQL
I 89 96 SQLERP SQL
I 97 120 SQLERR SQL
I B 97 1000SQLER1 SQL
I B 101 1040SQLER2 SQL
I B 105 1080SQLER3 SQL
I B 109 1120SQLER4 SQL
I B 113 1160SQLER5 SQL
I B 117 1200SQLER6 SQL
I 121 131 SQLWRN SQL
I 121 121 SQLWN0 SQL
I 122 122 SQLWN1 SQL
I 123 123 SQLWN2 SQL
I 124 124 SQLWN3 SQL
I 125 125 SQLWN4 SQL
I 126 126 SQLWN5 SQL
I 127 127 SQLWN6 SQL
I 128 128 SQLWN7 SQL
I 129 129 SQLWN8 SQL
I 130 130 SQLWN9 SQL
I 131 131 SQLWNA SQL
I 132 136 SQLSTT SQL
I* End of SQLCA SQL</pre>
<div class="note"><span class="notetitle">Note:</span> Variable
names in RPG/400 are
limited to 6 characters. The standard SQLCA names have been changed to a length
of 6. RPG/400 does
not have a way of defining arrays in a data structure without also defining
them in the extension specification. SQLERR is defined as character with SQLER1
through 6 used as the names of the elements.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajprpg.htm" title="The RPG/400 licensed program supports both RPG II and RPG III programs.">Code SQL statements in RPG/400 applications</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../db2/rbafzmstsqlcca.htm">SQL communication area</a></div>
</div>
</div>
</body>
</html>