ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzajp_5.4.0.1/rzajpequivsqlirpg.htm

423 lines
27 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 equivalent SQL and ILE RPG data types" />
<meta name="abstract" content="The precompiler determines the base SQLTYPE and SQLLEN of host variables according to the following table. If a host variable appears with an indicator variable, the SQLTYPE is the base SQLTYPE plus one." />
<meta name="description" content="The precompiler determines the base SQLTYPE and SQLLEN of host variables according to the following table. If a host variable appears with an indicator variable, the SQLTYPE is the base SQLTYPE plus one." />
<meta name="DC.subject" content="ILE RPG program, SQL data types, determining equivalent RPG, data type, determining equivalent, ILE RPG, SQL data types, determining equivalent, numeric host variable, host variable, numeric, date/time, ILE RPG, character, graphic, ILE RPG, host variable, date/time, graphic host variable, ILE RPG, character host variable" />
<meta name="keywords" content="ILE RPG program, SQL data types, determining equivalent RPG, data type, determining equivalent, ILE RPG, SQL data types, determining equivalent, numeric host variable, host variable, numeric, date/time, ILE RPG, character, graphic, ILE RPG, host variable, date/time, graphic host variable, ILE RPG, character host variable" />
<meta name="DC.Relation" scheme="URI" content="rzajprpgi.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajpirpgnotes.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="rzajpequivsqlirpg" />
<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 equivalent SQL and ILE RPG data types</title>
</head>
<body id="rzajpequivsqlirpg"><a name="rzajpequivsqlirpg"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Determine equivalent SQL and ILE RPG data types</h1>
<div><p>The precompiler determines the base SQLTYPE and SQLLEN of host
variables according to the following table. If a host variable appears with
an indicator variable, the SQLTYPE is the base SQLTYPE plus one.</p>
<div class="tablenoborder"><a name="rzajpequivsqlirpg__dtgi"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rzajpequivsqlirpg__dtgi" width="100%" frame="border" border="1" rules="all"><caption>Table 1. ILE RPG declarations mapped
to typical SQL data types</caption><thead align="left"><tr><th align="left" valign="bottom" width="19.05731965063278%" id="d0e88">RPG data type</th>
<th align="left" valign="bottom" width="26.35277940464974%" id="d0e90">RPG coding</th>
<th align="left" valign="bottom" width="13.82190420412009%" id="d0e92">SQLTYPE of host variable</th>
<th align="left" valign="bottom" width="16.513457767818494%" id="d0e94">SQLLEN of host variable</th>
<th align="left" valign="bottom" width="24.254538972778896%" id="d0e96">SQL data type</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Data structure (without subfields)</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Length = n where n ≤ 32766.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">452</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">CHAR(n)</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Zoned data</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with data type S or blank. </li>
<li>Defined on Definition specification with data type S.</li>
<li>Defined on Input specification with data type S or blank.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">488</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">p in byte 1, s in byte 2</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">NUMERIC(p, s) where p is the number of digits
and s is the number of decimal places</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Packed data</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification with decimal positions (pos 69-70)
not blank.</li>
<li>Defined on Definition specification subfield with data type P.</li>
<li>Defined on Definition specification with data type P or blank.</li>
<li>Defined on Input specification with data type P.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">484</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">p in byte 1, s in byte 2</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">DECIMAL(p, s) where p is the number of digits
and s is the number of decimal places</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">2-byte binary with zero decimal positions</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type B and byte length 2.</li>
<li>Defined on Definition specification with data type B and digits from 1
to 4.</li>
<li>Defined on Input specification with data type B and byte length 2</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">500</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">2</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">SMALLINT</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">4-byte binary with zero decimal positions</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type B and byte length 4.</li>
<li>Defined on Definition specification with data type B and digits from 5
to 9.</li>
<li>Defined on Input specification with data type B and byte length 4.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">496</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">4</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">INTEGER</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">2-byte integer</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type I and byte length 2. </li>
<li>Defined on Definition specification with data type I and digits 5.</li>
<li>Defined on Input specification with data type I and byte length 2.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">500</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">2</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">SMALLINT</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">4-byte integer</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type I and byte length 4. </li>
<li>Defined on Definition specification with data type I and digits 10. </li>
<li>Defined on Input specification with data type I and byte length 4.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">496</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">4</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">INTEGER</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">8-byte integer</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type I and byte length 8. </li>
<li>Defined on Definition specification with data type I and digits 20.</li>
<li>Defined on Input specification with data type I and byte length 8.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">492</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">8</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">BIGINT</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">short float</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type = F, length = 4.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">480</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">4</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">FLOAT (single precision) </td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">long float</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type = F, length = 8.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">480</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">8</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">FLOAT (double precision) </td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Character </td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type = A or blank, decimal
positions blank, length between 1 and 32766.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">452</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">CHAR (n) where n is the length </td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Character varying length greater than 254</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type = A or blank, decimal
positions blank, VARYING keyword on Definition specification or format *VAR
on Input specification.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">448</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">VARCHAR (n) where n is the length</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Character varying length between 1 and 254</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type = A or blank, decimal
positions blank, VARYING keyword on Definition specification or format *VAR
on Input specification.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">456</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">VARCHAR (n) where n is the length </td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">graphic</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type G and byte-length b.</li>
<li>Defined on Definition specification with data type G and length n. </li>
<li>Defined on Input specification with data type G and byte-length b</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">468</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">m</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">GRAPHIC(m) where m = n or m = b/2</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">varying graphic</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type G and byte-length b and VARYING keyword.</li>
<li>Defined on Definition specification with data type G and length n and
VARYING keyword.</li>
<li>Defined on Input specification with data type G and byte-length b and
format *VAR.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">464</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">m</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">VARGRAPHIC(m) where m = n or m = (b-2)/2</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">UCS-2</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type C and byte-length b.</li>
<li>Defined on Definition specification with data type C and length n.</li>
<li>Defined on Input specification with data type C and byte-length b.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">468</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">m</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">GRAPHIC(m) with CCSID 13488 where m = n or
m = b/2</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">varying UCS-2</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification as subfield with from and to positions
and data type C and byte-length b and VARYING keyword.</li>
<li>Defined on Definition specification with data type C and length n and
VARYING keyword.</li>
<li>Defined on Input specification with data type C and byte-length b and
format *VAR.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">464</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">m</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">VARGRAPHIC(m) with CCSID 13488 where m =
n or m = b/2</td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Date</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification with data type D, format f and separator
s from DATFMT keyword.</li>
<li>Defined on Input specification with data type D and format in pos 31-34,
separator in pos 35.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">384</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">DATE DATFMT(f) DATSEP(s)<sup>1</sup></td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Time</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 "> <ul><li>Defined on Definition specification with data type T, format f and separator
s from TIMFMT keyword.</li>
<li>Defined on Input specification with data type T and format in pos 31-34,
separator in pos 35.</li>
</ul>
</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">388</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">TIME TIMFMT(f) TIMSEP(s)<sup>1</sup></td>
</tr>
<tr><td align="left" valign="top" width="19.05731965063278%" headers="d0e88 ">Timestamp</td>
<td align="left" valign="top" width="26.35277940464974%" headers="d0e90 ">Data type Z.</td>
<td align="left" valign="top" width="13.82190420412009%" headers="d0e92 ">392</td>
<td align="left" valign="top" width="16.513457767818494%" headers="d0e94 ">n</td>
<td align="left" valign="top" width="24.254538972778896%" headers="d0e96 ">TIMESTAMP</td>
</tr>
<tr><td colspan="5" valign="top" headers="d0e88 d0e90 d0e92 d0e94 d0e96 "><sup>1</sup>SQL creates
the date/time subfield using the DATE/TIME format specified on the CRTSQLRPGI
command. The conversion to the host variable DATE/TIME format occurs when
the mapping is done between the host variables and the SQL-generated
subfields.</td>
</tr>
</tbody>
</table>
</div>
<div class="section"><p>The following table can be used to determine the RPG data type
that is equivalent to a given SQL data type.</p>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="all"><caption>Table 2. SQL data types mapped to typical
RPG declarations</caption><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" id="d0e429">SQL data type</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e431">RPG data type</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e433">Notes</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">SMALLINT</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. I in position 40,
length must be 5 and 0 in position 42. <p>OR</p>
<p>Definition specification.
B in position 40, length must be ≤ 4 and 0 in position 42.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">INTEGER</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. I in position 40,
length must be 10 and 0 in position 42. <p>OR</p>
<p>Definition specification.
B in position 40, length must be ≤ 9 and ≥ 5 and 0 in position 42.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">BIGINT</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. I in position 40,
length must be 20 and 0 in position 42.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">DECIMAL</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. P in position 40
or blank in position 40 for a non-subfield, 0 through 30 in position 41,42. <p>OR</p>
<p>Defined
as numeric on non-definition specification.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Maximum length of 16 (precision 30) and maximum
scale of 30.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">NUMERIC</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. S in position 40
or blank in position 40 for a subfield, 0 through 30 in position 41,42.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Maximum length of 30 (precision 30) and maximum
scale of 30.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">FLOAT (single precision)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. F in position 40,
length must be 4.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">FLOAT (double precision)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. F in position 40,
length must be 8.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">CHAR(n)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. A or blank in positions
40 and blanks in position 41,42. <p>OR</p>
<div class="p">Input field defined
without decimal places. <p>OR</p>
</div>
<p>Calculation result field
defined without decimal places.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">n can be from 1 to 32766.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">CHAR(n)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Data structure name with no subfields in
the data structure.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">n can be from 1 to 32766.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">VARCHAR(n)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. A or blank in position
40 and VARYING in positions 44-80.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">n can be from 1 to 32740.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">CLOB</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a CLOB.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">GRAPHIC(n)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. G in position 40.<p>OR</p>
<p>Input
field defined with G in position 36.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">n can be 1 to 16383.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">VARGRAPHIC(n)</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Definition specification. G in position 40
and VARYING in positions 44-80.</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">n can be from 1 to 16370.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">DBCLOB</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a DBCLOB.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">BINARY</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a BINARY.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">VARBINARY</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a VARBINARY.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">BLOB</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a BLOB.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">DATE</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">A character field <p>OR </p>
<div class="p">Definition
specification with a D in position 40. <p>OR</p>
</div>
<p>Input field
defined with D in position 36.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">If the format is *USA, *JIS, *EUR, or *ISO,
the length must be at least 10. If the format is *YMD, *DMY, or *MDY, the
length must be at least 8. If the format is *JUL, the length must be at least
6.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">TIME</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">A character field <p>OR</p>
<div class="p">Definition
specification with a T in position 40. <p>OR</p>
</div>
<p>Input field
defined with T in position 36.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Length must be at least 6; to include seconds,
length must be at least 8.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">TIMESTAMP</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">A character field <p>OR</p>
<div class="p">Definition
specification with a Z in position 40. <p>OR</p>
</div>
<p>Input field
defined with Z in position 36.</p>
</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e433 ">Length must be at least 19; to include microseconds,
length must be at least 26. If length is less than 26, truncation occurs on
the microsecond part.</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e429 ">DATALINK</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td valign="top" width="33.33333333333333%" headers="d0e433 ">&nbsp;</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e429 ">ROWID</td>
<td valign="top" width="33.33333333333333%" headers="d0e431 ">Not supported</td>
<td valign="top" width="33.33333333333333%" headers="d0e433 ">Use SQLTYPE keyword to declare a ROWID.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzajpirpgnotes.htm">Notes on ILE RPG variable declaration and usage</a></strong><br />
ILE RPG associates precision and scale with all numeric types.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajprpgi.htm" title="This topic describes the unique application and coding requirements for embedding SQL statements in an ILE RPG program. The coding requirements for host variables are defined.">Code SQL statements in ILE RPG applications</a></div>
</div>
</div>
</body>
</html>