64 lines
3.9 KiB
HTML
64 lines
3.9 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="Use indicator variables in RPG/400 applications that use SQL" />
|
||
|
<meta name="abstract" content="An indicator variable is a two-byte integer." />
|
||
|
<meta name="description" content="An indicator variable is a two-byte integer." />
|
||
|
<meta name="DC.subject" content="indicator variable, RPG/400, RPG/400 program, indicator structure, coding requirement, indicator variable" />
|
||
|
<meta name="keywords" content="indicator variable, RPG/400, RPG/400 program, indicator structure, coding requirement, indicator variable" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajprpg.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajpexampindicatorrpg.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstch2refvar.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="rzajpindicatorrpg" />
|
||
|
<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 indicator variables in RPG/400 applications that use SQL</title>
|
||
|
</head>
|
||
|
<body id="rzajpindicatorrpg"><a name="rzajpindicatorrpg"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Use indicator variables in RPG/400<sup>®</sup> applications that use SQL</h1>
|
||
|
<div><p>An indicator variable is a two-byte integer.</p>
|
||
|
<div class="section"><p>See the entry for the SMALLINT SQL data type in <a href="rzajpequivsqlrpg.htm#rzajpequivsqlrpg__dtg">Table 1</a>.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>An indicator structure can be defined by declaring the variable
|
||
|
as an array with an element length of 4,0 and declaring the array name as
|
||
|
a subfield of a data structure with B in position 43. On retrieval, an indicator
|
||
|
variable is used to show whether its associated host variable has been assigned
|
||
|
a null value. On assignment to a column, a negative indicator variable is
|
||
|
used to indicate that a null value should be assigned.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>Indicator variables are declared in the same way as host variables
|
||
|
and the declarations of the two can be mixed in any way that seems appropriate
|
||
|
to the programmer.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rzajpexampindicatorrpg.htm">Example: Use indicator variables in RPG/400 applications that use SQL</a></strong><br />
|
||
|
The following example shows declaring indicator variables in RPG.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajprpg.htm" title="The RPG/400 licensed program supports both RPG II and RPG III programs.">Code SQL statements in RPG/400 applications</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="../db2/rbafzmstch2refvar.htm">References to variables</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|