65 lines
4.1 KiB
HTML
65 lines
4.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="reference" />
|
|
<meta name="DC.Title" content="Continuation for SQL statements in ILE RPG applications that use SQL" />
|
|
<meta name="abstract" content="This topic introduces the continuation for SQL statements in two types of RPG format." />
|
|
<meta name="description" content="This topic introduces the continuation for SQL statements in two types of RPG format." />
|
|
<meta name="DC.subject" content="ILE RPG program, continuation, coding requirement, ILE RPG, DBCS constants" />
|
|
<meta name="keywords" content="ILE RPG program, continuation, coding requirement, ILE RPG, DBCS constants" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpembedirpg.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="rzajpcontinuationirpg" />
|
|
<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>Continuation for SQL statements in ILE RPG applications that use SQL</title>
|
|
</head>
|
|
<body id="rzajpcontinuationirpg"><a name="rzajpcontinuationirpg"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Continuation for SQL statements in ILE RPG applications that use SQL</h1>
|
|
<div><p><span><img src="./delta.gif" alt="Start of change" />This topic introduces the continuation for
|
|
SQL statements in two types of RPG format.<img src="./deltaend.gif" alt="End of change" /></span></p>
|
|
<div class="section"><h4 class="sectiontitle">Fixed-form RPG</h4><p>When additional records are needed
|
|
to contain the SQL statement, positions 9 through 80 can be used. Position
|
|
7 must be a + (plus sign), and position 8 must be blank. Position 80 of the
|
|
continued line is concatenated with position 9 of the continuation line.</p>
|
|
<p>Constants
|
|
containing DBCS data can be continued across multiple lines by placing the
|
|
shift-in character in position 81 of the continued line and placing the shift-out
|
|
character in position 8 of the continuation line.</p>
|
|
</div>
|
|
<div class="section"><p>In this example the SQL statement has a valid graphic constant
|
|
of G'<AABBCCDDEEFFGGHHIIJJKK>'. </p>
|
|
<pre>
|
|
C/EXEC SQL SELECT * FROM GRAPHTAB WHERE GRAPHCOL = G'<AABBCCDDEE>
|
|
C+<FFGGHHIIJJKK>'
|
|
C/END-EXEC
|
|
</pre>
|
|
</div>
|
|
<div class="section"><img src="./delta.gif" alt="Start of change" /><h4 class="sectiontitle">Free-form RPG</h4><p>SQL statements can
|
|
be contained on one or more lines. To continue an SQL statement across multiple
|
|
lines, the SQL statement can be split wherever a blank is allowed. The plus
|
|
sign (+) can be used to indicate a continuation of a string constant. The
|
|
literal continues with the first nonblank character on the next line.</p>
|
|
<img src="./deltaend.gif" alt="End of change" /></div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpembedirpg.htm" title="SQL statements coded in an ILE RPG program must be placed in the calculation section.">Embed SQL statements in ILE RPG applications that use SQL</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |