97 lines
6.4 KiB
HTML
97 lines
6.4 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 ILE RPG applications that use SQL" />
|
||
|
<meta name="abstract" content="The SQL precompiler automatically places the SQLCA in the definition specifications of the ILE RPG program prior to the first calculation specification, unless a SET OPTION SQLCA = *NO statement is found." />
|
||
|
<meta name="description" content="The SQL precompiler automatically places the SQLCA in the definition specifications of the ILE RPG program prior to the first calculation specification, unless a SET OPTION SQLCA = *NO statement is found." />
|
||
|
<meta name="DC.subject" content="application program, SQLCA (SQL communication area), ILE RPG, SQLCA (SQL communication area), ILE RPG program, SQLCA, SQLCA placement" />
|
||
|
<meta name="keywords" content="application program, SQLCA (SQL communication area), ILE RPG, SQLCA (SQL communication area), ILE RPG program, SQLCA, SQLCA placement" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajprpgi.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="rzajpsqlcairpg" />
|
||
|
<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 ILE RPG applications that use
|
||
|
SQL</title>
|
||
|
</head>
|
||
|
<body id="rzajpsqlcairpg"><a name="rzajpsqlcairpg"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Define the SQL communications area in ILE RPG applications that use
|
||
|
SQL</h1>
|
||
|
<div><p>The SQL precompiler automatically places the SQLCA in the definition
|
||
|
specifications of the ILE RPG program prior to the first calculation specification,
|
||
|
unless a SET OPTION SQLCA = *NO statement is found.</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 source statements for ILE RPG are: </p>
|
||
|
<pre> D* SQL Communications area
|
||
|
D SQLCA DS
|
||
|
D SQLCAID 8A INZ(X'0000000000000000')
|
||
|
D SQLAID 8A OVERLAY(SQLCAID)
|
||
|
D SQLCABC 10I 0
|
||
|
D SQLABC 9B 0 OVERLAY(SQLCABC)
|
||
|
D SQLCODE 10I 0
|
||
|
D SQLCOD 9B 0 OVERLAY(SQLCODE)
|
||
|
D SQLERRML 5I 0
|
||
|
D SQLERL 4B 0 OVERLAY(SQLERRML)
|
||
|
D SQLERRMC 70A
|
||
|
D SQLERM 70A OVERLAY(SQLERRMC)
|
||
|
D SQLERRP 8A
|
||
|
D SQLERP 8A OVERLAY(SQLERRP)
|
||
|
D SQLERR 24A
|
||
|
D SQLER1 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLER2 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLER3 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLER4 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLER5 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLER6 9B 0 OVERLAY(SQLERR:*NEXT)
|
||
|
D SQLERRD 10I 0 DIM(6) OVERLAY(SQLERR)
|
||
|
D SQLWRN 11A
|
||
|
D SQLWN0 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN1 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN2 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN3 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN4 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN5 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN6 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN7 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN8 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWN9 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWNA 1A OVERLAY(SQLWRN:*NEXT)
|
||
|
D SQLWARN 1A DIM(11) OVERLAY(SQLWRN)
|
||
|
D SQLSTATE 5A
|
||
|
D SQLSTT 5A OVERLAY(SQLSTATE)
|
||
|
D* End of SQLCA </pre>
|
||
|
</div>
|
||
|
<div class="section"><p>If a SET OPTION SQLCA = *NO statement is found, the SQL precompiler
|
||
|
automatically places SQLCODE and SQLSTATE variables in the definition specification.
|
||
|
They are defined as follows when the SQLCA is not included: </p>
|
||
|
<pre>D SQLCODE S 10I 0
|
||
|
D SQLSTATE S 5A</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajprpgi.htm" title="This topic describes the unique application and coding requirements for embedding SQL statements in an ILE RPG program. The coding requirements for host variables are defined.">Code SQL statements in ILE RPG 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>
|