72 lines
4.5 KiB
HTML
72 lines
4.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="External file description considerations for host structure arrays in ILE RPG applications that use SQL" />
|
|
<meta name="abstract" content="For device files, if INDARA was not specified and the file contains indicators, the declaration is not used as a host structure array. The indicator area is included in the structure that is generated and would cause the storage to be separated." />
|
|
<meta name="description" content="For device files, if INDARA was not specified and the file contains indicators, the declaration is not used as a host structure array. The indicator area is included in the structure that is generated and would cause the storage to be separated." />
|
|
<meta name="DC.subject" content="external file description, host structure arrays, ILE RPG, file description, host structure arrays, ILE RPG, *NOCVTDT, precompiler parameter, DATFMT, DATSEP, TIMFMT, TIMSEP, ILE RPG" />
|
|
<meta name="keywords" content="external file description, host structure arrays, ILE RPG, file description, host structure arrays, ILE RPG, *NOCVTDT, precompiler parameter, DATFMT, DATSEP, TIMFMT, TIMSEP, ILE RPG" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajpexternalirpg.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="rzajpirpgexternal" />
|
|
<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>External file description considerations for host structure arrays
|
|
in ILE RPG applications that use SQL</title>
|
|
</head>
|
|
<body id="rzajpirpgexternal"><a name="rzajpirpgexternal"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">External file description considerations for host structure arrays
|
|
in ILE RPG applications that use SQL</h1>
|
|
<div><p>For device files, if INDARA was not specified and the file contains
|
|
indicators, the declaration is not used as a host structure array. The indicator
|
|
area is included in the structure that is generated and would cause the storage
|
|
to be separated. </p>
|
|
<div class="section"><p>If OPTION(*NOCVTDT) is specified and the date and time format
|
|
and separator of date and time field definitions within the file are not the
|
|
same as the DATFMT, DATSEP, TIMFMT, and TIMSEP parameters on the CRTSQLRPGI
|
|
command, then the host structure array is not usable.</p>
|
|
</div>
|
|
<div class="section"><p>In the following example, the DEPARTMENT table is included in
|
|
the ILE RPG program and used to declare a host structure array.
|
|
A blocked FETCH statement is then used to retrieve 10 rows into the host structure
|
|
array.</p>
|
|
<pre>DDEPARTMENT E DS OCCURS(10)
|
|
|
|
|
|
C/EXEC SQL
|
|
C+ <strong>DECLARE</strong> C1 <strong>CURSOR FOR</strong>
|
|
C+ <strong>SELECT</strong> *
|
|
C+ <strong>FROM</strong> CORPDATA.DEPARTMENT
|
|
C/END-EXEC
|
|
|
|
…
|
|
|
|
C/EXEC SQL
|
|
C+ <strong>FETCH</strong> C1 <strong>FOR</strong> 10 <strong>ROWS
|
|
C+ INTO</strong> :DEPARTMENT
|
|
C/END-EXEC
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajpexternalirpg.htm" title="Field definitions for externally described files, including renaming of fields, are recognized by the SQL precompiler. The external definition form of the data structure can be used to obtain a copy of the column names to be used as host variables.">Use external file descriptions in ILE RPG applications that use SQL</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |