109 lines
6.1 KiB
HTML
109 lines
6.1 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="concept" />
|
||
|
<meta name="DC.Title" content="Use the SQL statement processor" />
|
||
|
<meta name="abstract" content="The SQL statement processor allows SQL statements to be run from a source member. The statements in the source member can be run repeatedly, or changed, without compiling the source. This makes the setup of a database environment easier." />
|
||
|
<meta name="description" content="The SQL statement processor allows SQL statements to be run from a source member. The statements in the source member can be run repeatedly, or changed, without compiling the source. This makes the setup of a database environment easier." />
|
||
|
<meta name="DC.subject" content="RUNSQLSTM (Run SQL Statements), command (CL), SQL statement processor, using, source file, comment" />
|
||
|
<meta name="keywords" content="RUNSQLSTM (Run SQL Statements), command (CL), SQL statement processor, using, source file, comment" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydynamic.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyexecutestmt.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyccsqlstmt.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafysrcmember.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../cl/runsqlstm.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="rbafyrunstat" />
|
||
|
<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>Use the SQL statement processor</title>
|
||
|
</head>
|
||
|
<body id="rbafyrunstat"><a name="rbafyrunstat"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Use the SQL statement processor</h1>
|
||
|
<div><p>The SQL statement processor allows SQL statements to be run from
|
||
|
a source member. The statements in the source member can be run repeatedly,
|
||
|
or changed, without compiling the source. This makes the setup of a database
|
||
|
environment easier.</p>
|
||
|
<p>The SQL statement processor is available by using the Run
|
||
|
SQL Statements (RUNSQLSTM) command.</p>
|
||
|
<p>The statements that can be used with the SQL statement processor are:</p>
|
||
|
<ul><li>ALTER SEQUENCE</li>
|
||
|
<li>ALTER TABLE</li>
|
||
|
<li>CALL</li>
|
||
|
<li>COMMENT ON</li>
|
||
|
<li>COMMIT</li>
|
||
|
<li>CREATE ALIAS</li>
|
||
|
<li>CREATE DISTINCT TYPE</li>
|
||
|
<li>CREATE FUNCTION</li>
|
||
|
<li>CREATE INDEX</li>
|
||
|
<li>CREATE PROCEDURE</li>
|
||
|
<li>CREATE SCHEMA</li>
|
||
|
<li>CREATE SEQUENCE</li>
|
||
|
<li>CREATE TABLE</li>
|
||
|
<li>CREATE TRIGGER</li>
|
||
|
<li>CREATE VIEW</li>
|
||
|
<li>DECLARE GLOBAL TEMPORARY TABLE</li>
|
||
|
<li>DELETE</li>
|
||
|
<li>DROP</li>
|
||
|
<li>GRANT</li>
|
||
|
<li>INSERT</li>
|
||
|
<li>LABEL ON</li>
|
||
|
<li>LOCK TABLE</li>
|
||
|
<li>REFRESH TABLE</li>
|
||
|
<li>RELEASE SAVEPOINT</li>
|
||
|
<li>RENAME</li>
|
||
|
<li>REVOKE </li>
|
||
|
<li>ROLLBACK</li>
|
||
|
<li>SAVEPOINT</li>
|
||
|
<li><img src="./delta.gif" alt="Start of change" />SET CURRENT DEGREE<img src="./deltaend.gif" alt="End of change" /></li>
|
||
|
<li><img src="./delta.gif" alt="Start of change" />SET ENCRYPTION PASSWORD<img src="./deltaend.gif" alt="End of change" /></li>
|
||
|
<li>SET PATH</li>
|
||
|
<li>SET SCHEMA</li>
|
||
|
<li>SET TRANSACTION</li>
|
||
|
<li>UPDATE</li>
|
||
|
</ul>
|
||
|
<p>In the source member, statements end with a semicolon and do not begin
|
||
|
with <strong>EXEC SQL</strong>. If the record length of the source member is longer
|
||
|
than 80, only the first 80 characters will be read. Comments in the source
|
||
|
member can be either line comments or block comments. Line comments begin
|
||
|
with a double hyphen (--) and end at the end of the line. Block comments start
|
||
|
with /* and can continue across many lines until the next */ is reached. Block
|
||
|
comments can be nested. Only SQL statements and comments are allowed in the
|
||
|
source file. The output listing and the resulting messages for the SQL statements
|
||
|
are sent to a print file. The default print file is QSYSPRT.</p>
|
||
|
<p>To perform syntax checking only on all statements in the source member,
|
||
|
specify the PROCESS(*SYN) parameter on the RUNSQLSTM command.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafyexecutestmt.htm">Execution of statements after errors occur</a></strong><br />
|
||
|
When a statement returns an error with a severity higher than the value specified for the error level (ERRLVL) parameter of the RUNSQLSTM command, the statement has failed.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyccsqlstmt.htm">Commitment control in the SQL statement processor</a></strong><br />
|
||
|
A commitment-control level is specified on the RUNSQLSTM command.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafysrcmember.htm">Source member listing for the SQL statement processor</a></strong><br />
|
||
|
The following example details a source member listing for the SQL statement processor.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydynamic.htm" title="You can use SQL in many different environments. Some of them are discussed here.">Use SQL in different environments</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../cl/runsqlstm.htm">Run SQL Statement (RUNSQLSTM) command</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|