115 lines
6.7 KiB
HTML
115 lines
6.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="Character host variables in COBOL applications that use SQL" />
|
||
<meta name="abstract" content="There are two valid forms of character host variables." />
|
||
<meta name="description" content="There are two valid forms of character host variables." />
|
||
<meta name="DC.subject" content="character host variable, COBOL, host variable, character, COBOL program" />
|
||
<meta name="keywords" content="character host variable, COBOL, host variable, character, COBOL program" />
|
||
<meta name="DC.Relation" scheme="URI" content="rzajpdeclaringhostcobol.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="rzajpcobchar" />
|
||
<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>Character host variables in COBOL applications that use SQL</title>
|
||
</head>
|
||
<body id="rzajpcobchar"><a name="rzajpcobchar"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Character host variables in COBOL applications that use SQL</h1>
|
||
<div><p>There are two valid forms of character host variables.</p>
|
||
<div class="section"><ul><li>Fixed-Length Strings</li>
|
||
<li>Varying-Length Strings</li>
|
||
</ul>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Fixed-length character strings</h4><pre><span><img src="./c.gif" border="0" alt="Read syntax diagram" longdesc="rzajpcobcharsyn1.htm" /></span><a href="#d0e38"><img src="./c.gif" border="0" alt="Skip visual syntax diagram" /></a>
|
||
>>-+-01------+--<i>variable-name</i>--+-PICTURE-+---------------------->
|
||
+-77------+ '-PIC-----'
|
||
'-<i>level-1</i>-'
|
||
|
||
.-IS-.
|
||
>--+----+--<i>picture-string</i>--+----------------------------+------->
|
||
| .-IS-. |
|
||
| .-USAGE--+----+-. |
|
||
'-+---------------+--DISPLAY-'
|
||
|
||
>--+--------------------------------+-- . ---------------------><
|
||
| .-IS-. |
|
||
'-VALUE--+----+--<i>string-constant</i>-'
|
||
|
||
</pre><a name="d0e38"></a></div>
|
||
<div class="section"> <div class="note"><span class="notetitle">Notes:</span> <ol><li>The <em>picture string</em> associated with these forms must be X(m) (or
|
||
XXX...X, with m instance of X) with 1 ≤ m ≤ 32 766.</li>
|
||
<li>level-1 indicates a COBOL level between 2 and 48.</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Varying-length character strings</h4><pre><span><img src="./c.gif" border="0" alt="Read syntax diagram" longdesc="rzajpcobcharsyn2.htm" /></span><a href="#d0e92"><img src="./c.gif" border="0" alt="Skip visual syntax diagram" /></a>
|
||
>>-+-01------+--<i>variable-name</i>-- . ------------------------------>
|
||
'-<i>level-1</i>-'
|
||
|
||
.-IS-.
|
||
>--49--<i>var-1</i>--+-PICTURE-+--+----+--<i>picture-string-1</i>------------->
|
||
'-PIC-----'
|
||
|
||
.-IS-.
|
||
.-USAGE--+----+-.
|
||
>--+---------------+--+-BINARY----------+----------------------->
|
||
+-COMPUTATIONAL-4-+
|
||
'-COMP-4----------'
|
||
|
||
>--+---------------------------------+-- . --------------------->
|
||
| .-IS-. |
|
||
'-VALUE--+----+--<i>numeric-constant</i>-'
|
||
|
||
.-IS-.
|
||
>--49--<i>var-2</i>--+-PICTURE-+--+----+--<i>picture-string-2</i>------------->
|
||
'-PIC-----'
|
||
|
||
>--+----------------------------+------------------------------->
|
||
| .-IS-. |
|
||
| .-USAGE--+----+-. |
|
||
'-+---------------+--DISPLAY-'
|
||
|
||
>--+--------------------------------+-- . ---------------------><
|
||
| .-IS-. |
|
||
'-VALUE--+----+--<i>string-constant</i>-'
|
||
|
||
</pre><a name="d0e92"></a></div>
|
||
<div class="section"> <div class="note"><span class="notetitle">Notes:</span> <ol><li>The <em>picture-string-1</em> associated with these forms must be S9(m)
|
||
or S9...9 with m instances of 9. m must be from 1 to 4. <p>Note that the database
|
||
manager will use the full size of the S9(m) variable even though COBOL on
|
||
the <span class="keyword">iSeries™</span> only recognizes
|
||
values up to the specified precision. This can cause data truncation errors
|
||
when COBOL statements are being run and may effectively limit the maximum
|
||
length of variable-length character strings to the specified precision.</p>
|
||
</li>
|
||
<li id="rzajpcobchar__rdhbli1"><a name="rzajpcobchar__rdhbli1"><!-- --></a>The <em>picture-string-2</em> associated with these forms must
|
||
be either X(m), or XX...X, with m instances of X, and with 1 ≤ m ≤ 32 740.</li>
|
||
<li><em>var-1</em> and <em>var-2</em> cannot be used as host variables.</li>
|
||
<li>level-1 indicates a COBOL level between 2 and 48.</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpdeclaringhostcobol.htm" title="The COBOL precompiler only recognizes a subset of valid COBOL declarations as valid host variable declarations.">Declare host variables in COBOL applications that use SQL</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|