132 lines
8.5 KiB
HTML
132 lines
8.5 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="Determine data types of input host variables in REXX applications that use SQL" />
|
|
<meta name="abstract" content="All data in REXX is in the form of strings." />
|
|
<meta name="description" content="All data in REXX is in the form of strings." />
|
|
<meta name="DC.subject" content="SQL data types, determining equivalent, REXX, data type" />
|
|
<meta name="keywords" content="SQL data types, determining equivalent, REXX, data type" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajphostvariablesrexx.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="rzajpdeterminerexx" />
|
|
<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>Determine data types of input host variables in REXX applications that
|
|
use SQL</title>
|
|
</head>
|
|
<body id="rzajpdeterminerexx"><a name="rzajpdeterminerexx"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Determine data types of input host variables in REXX applications that
|
|
use SQL</h1>
|
|
<div><p>All data in REXX is in the form of strings.</p>
|
|
<div class="section"><p>The data type of input host variables (that is, host variables
|
|
used in a 'USING host variable' clause in an EXECUTE or OPEN statement) is
|
|
inferred by the database manager at run time from the contents of the variable
|
|
according to the table below.</p>
|
|
</div>
|
|
<div class="section"><p>These rules define either numeric, character, or graphic values.
|
|
A numeric value can be used as input to a numeric column of any type. A character
|
|
value can be used as input to a character column of any type, or to a date,
|
|
time, or timestamp column. A graphic value can be used as input to a graphic
|
|
column of any type.</p>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rzajpdeterminerexx__rexdtr"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rzajpdeterminerexx__rexdtr" width="100%" frame="hsides" border="1" rules="rows"><caption>Table 1. Determine data types
|
|
of host variables in REXX</caption><thead align="left"><tr><th align="left" valign="bottom" width="42.331288343558285%" id="d0e41"> Host variable contents</th>
|
|
<th align="left" valign="bottom" width="22.290388548057262%" id="d0e43">Assumed data type</th>
|
|
<th align="left" valign="bottom" width="13.0879345603272%" id="d0e45">SQL type code</th>
|
|
<th align="left" valign="bottom" width="22.290388548057262%" id="d0e47">SQL type description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">A number with neither decimal point nor exponent.
|
|
It can have a leading plus or minus sign.</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Signed integers</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">496/497</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">INTEGER</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">A number that includes a decimal point, but
|
|
no exponent, <p>or a number that does not include a decimal point or an exponent
|
|
and is greater than 2147483647 or smaller than -2147483647.</p>
|
|
<p>It can
|
|
have a leading plus or minus sign. <em>m</em> is the total number of digits
|
|
in the number. <em>n</em> is the number of digits to the left of the decimal
|
|
point (if any).</p>
|
|
</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Packed decimal</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">484/485</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">DECIMAL(m,n)</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">A number that is in scientific or engineering
|
|
notation (that is, followed immediately by an 'E' or 'e', an optional plus
|
|
or minus sign, and a series of digits). It can have a leading plus or minus
|
|
sign.</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Floating point</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">480/481</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">DOUBLE PRECISION</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">A string with leading and trailing apostrophes
|
|
(') or quotation marks ("), which has length n after removing the two delimiters,
|
|
<p>or a string with a leading X or x followed by a single quotation mark
|
|
(') or quotation mark ("), and a trailing apostrophe (') or quotation mark
|
|
("). The string has a length of 2n after removing the X or x and the two delimiters.
|
|
Each remaining pair of characters is the hexadecimal representation of a single
|
|
character.</p>
|
|
<p>or a string of length n, which cannot be recognized as character,
|
|
numeric, or graphic through other rules in this table</p>
|
|
</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Varying-length character string</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">448/449</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">VARCHAR(n)</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">A string with a leading and trailing apostrophe
|
|
(') or quotation marks (") preceded by: <sup>1</sup> <ul><li>A string that starts with a G, g, N or n. This is followed by a single
|
|
quotation mark or quotation mark and a shift-out (x'0E'). This is followed
|
|
by n graphic characters, each 2 characters long. The string must end with
|
|
a shift-in (X'0F') and a single quotation mark or quotation mark (whichever
|
|
the string started with).</li>
|
|
<li>A string with a leading GX, Gx, gX, or gx, followed by a single quotation
|
|
mark or quotation mark and a shift-out (x'0E'). This is followed by n graphic
|
|
characters, each 2 characters long. The string must end with a shift-in (X'0F')
|
|
and a single quotation mark or quotation mark (whichever the string started
|
|
with). The string has a length of 4n after removing the GX and the delimiters.
|
|
Each remaining group of 4 characters is the hexadecimal representation of
|
|
a single graphic character.</li>
|
|
</ul>
|
|
</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Varying-length graphic string</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">464/465</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">VARGRAPHIC(n)</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="42.331288343558285%" headers="d0e41 ">Undefined Variable</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e43 ">Variable for which a value has not been assigned</td>
|
|
<td align="left" valign="top" width="13.0879345603272%" headers="d0e45 ">None</td>
|
|
<td align="left" valign="top" width="22.290388548057262%" headers="d0e47 ">Data that is not valid was detected.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> The byte immediately following the leading apostrophe is a <span>X'0E'</span> shift-out,
|
|
and the byte immediately preceding the trailing apostrophe is a <span>X'0F'</span> shift-in.</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajphostvariablesrexx.htm" title="REXX does not provide for variable declarations.">Use host variables in REXX applications that use SQL</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |