ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstsqlcca.htm

55 lines
3.5 KiB
HTML
Raw 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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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="keywords" content="contents, SQLCA (SQL communication area),
description, SQLCA, application program" />
<title>SQLCA (SQL communication area)</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="sqlcca"></a>
<h1 id="sqlcca"><a href="rbafzmst02.htm#ToC_1493">Appendix C. SQLCA (SQL communication area)</a></h1><a id="idx3411" name="idx3411"></a><a id="idx3412" name="idx3412"></a><a id="idx3413" name="idx3413"></a>
<p>An SQLCA is a set of variables that may be updated at the end of the execution
of every SQL statement. A program that contains executable SQL statements
may provide one, but no more than one SQLCA (unless a stand-alone SQLCODE
or a stand-alone SQLSTATE variable is used instead), except in Java&trade;,
where the SQLCA is not applicable.</p>
<p>Instead of using an SQLCA, the GET DIAGNOSTICS statement can be used in
all languages to return return codes and other information about the previous
SQL statement. For more information, see <a href="rbafzmstgetdiag.htm#getdiag">GET DIAGNOSTICS</a>.</p>
<p>The SQL INCLUDE statement can be used to provide the declaration of the
SQLCA in all host languages except Java, RPG, or REXX. For information on
the use of the SQLCA in a REXX procedure, see the <a href="../rzajp/rzajpkickoff.htm">Embedded
SQL Programming</a> book. For information on how to access the information
regarding errors and warnings in Java, refer to the <a href="../rzaha/whatitis.htm">IBM&reg; Developer
Kit for Java</a>.</p>
<p>In C, COBOL, FORTRAN, and PL/I, the name of the storage area must be SQLCA.
Every SQL statement must be within the scope of its declaration.</p>
<p>If a stand-alone SQLCODE or SQLSTATE is specified in the program, the SQLCA
must not be included. For more information, see <a href="rbafzmstcksql.htm#cksql">SQL return codes</a>.</p>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstdiftab2.htm">Previous Page</a> | <a href="rbafzmstfielddescsqlca.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>