64 lines
3.7 KiB
HTML
64 lines
3.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="reference" />
|
|
<meta name="DC.Title" content="Handle errors and warnings in REXX applications that use SQL" />
|
|
<meta name="abstract" content="The WHENEVER statement is not supported by the SQL/REXX interface. You can use one of several substitutes, however." />
|
|
<meta name="description" content="The WHENEVER statement is not supported by the SQL/REXX interface. You can use one of several substitutes, however." />
|
|
<meta name="DC.subject" content="WHENEVER statement, REXX, substitute for, SIGNAL ON ERROR in REXX, SIGNAL ON FAILURE in REXX" />
|
|
<meta name="keywords" content="WHENEVER statement, REXX, substitute for, SIGNAL ON ERROR in REXX, SIGNAL ON FAILURE in REXX" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpembedsqlrexx.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="rzajprxerr" />
|
|
<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>Handle errors and warnings in REXX applications that use SQL</title>
|
|
</head>
|
|
<body id="rzajprxerr"><a name="rzajprxerr"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Handle errors and warnings in REXX applications that use SQL</h1>
|
|
<div><p>The WHENEVER statement is not supported by the SQL/REXX interface.
|
|
You can use one of several substitutes, however.</p>
|
|
<div class="section"><p> Any of the following may be used instead:</p>
|
|
<ul><li>A test of the REXX SQLCODE or SQLSTATE variables after each SQL statement
|
|
to detect error and warning conditions issued by the database manager, but
|
|
not for those issued by the SQL/REXX interface.</li>
|
|
<li>A test of the REXX RC variable after each SQL statement to detect error
|
|
and warning conditions. Each use of the EXECSQL command sets the RC variable
|
|
to: <dl><dt class="dlterm">0</dt>
|
|
<dd>Statement completed successfully.</dd>
|
|
<dt class="dlterm">+10</dt>
|
|
<dd> A SQL warning occurred.</dd>
|
|
<dt class="dlterm">-10</dt>
|
|
<dd>An SQL error occurred</dd>
|
|
<dt class="dlterm">-100</dt>
|
|
<dd>An SQL/REXX interface error occurred.</dd>
|
|
</dl>
|
|
<p>This can be used to detect errors and warnings issued by
|
|
either the database manager or by the SQL/REXX interface. </p>
|
|
</li>
|
|
<li>The SIGNAL ON ERROR and SIGNAL ON FAILURE facilities can be used to detect
|
|
errors (negative RC values), but not warnings.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpembedsqlrexx.htm" title="An SQL statement can be placed anywhere a REXX command can be placed.">Embed SQL statements in REXX applications</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |