331 lines
12 KiB
HTML
331 lines
12 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Add View Description (QteAddViewDescription) API</title>
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- 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. -->
|
|
<!-- DEBUG1 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
|
<!-- at RCHVMW2 on 29 Jan 1999 at 16:05:09 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--File Edited November 2001 -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Add View Description (QteAddViewDescription) API</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Required Parameter Group:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Previous view number</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">View type</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">3</td>
|
|
<td align="left" valign="top">Input/output</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">Create map</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">5</td>
|
|
<td align="left" valign="top">View description</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(50)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">6</td>
|
|
<td align="left" valign="top">View number</td>
|
|
<td align="left" valign="top">Output</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">7</td>
|
|
<td align="left" valign="top">Error code</td>
|
|
<td align="left" valign="top">I/O</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Service Program: QTECRTVS<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The program uses the Add View Description (QteAddViewDescription) API to add a new view in the existing view information. The added view can then be used on subsequent APIs when providing text and map details associated with this view.</p>
|
|
|
|
<p>It is the responsibility of each processor to create its input view, which is the root source file read by the processor. Each processor must also create its output view, which is the source produced by the processor. Other intermediate views may be produced, but, as a minimum, there must be a map between a processor's input and output view.</p>
|
|
|
|
<p>If a processor discards views produced by previous preprocessors, then it is not necessary for the input source view to be created. For example, the C compiler can create only a listing file view, as long as it discards all previous views.</p>
|
|
|
|
<p>It is possible to create several views at one time. It is the responsibility of the processes creating multiple views to manage them.</p>
|
|
|
|
<p>When a view is created, a handle to that view is returned in the form of a view number. This number is needed when adding text or maps that refer to the view. Once a view has been created, it cannot be created again. However, text and maps can be added to the view if it already exists. Thus, one processor can create the view, and another processor can add a map to the view, if that processor knows the view number.</p>
|
|
|
|
<p>There is only one statement view per module. If the statement view is created more than once, an error results. However, the statement view number is returned. This allows one processor to create the statement view and another processor to determine which number the view is.</p>
|
|
|
|
<p><strong>Note:</strong> The following restrictions apply to the adding of views.</p>
|
|
|
|
<ol>
|
|
<li>If a *TEXT view is added and that view refers to text in a previous view, the previous view must also be a *TEXT view.</li>
|
|
|
|
<li>The *INPUT and *OUTPUT views of a processor must be *TEXT views. A processor does not have to create these views.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
|
|
<!-- Instead, use the commented out coding below to indicate NONE. -->
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<!-- Use this if there are no authorities and locks. -->
|
|
<p>None.</p>
|
|
|
|
<br>
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Previous view number</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The view number of a previous view whose text is used in creating the text for this view. When describing text for this view, it can be indicated that part of the text is a direct copy of text in the previous view. This allows the API to automatically generate a map between this view and the previous view.</p>
|
|
|
|
<p>As an example, if a preprocessor takes as input some source, changes it by expanding macros or SQL statements, and outputs the changed source, then the output view would have the input view as its previous view. When creating text from the output view, some of the text could come from the input view.</p>
|
|
|
|
<p>The previous view of a *TEXT view must also be a *TEXT view.</p>
|
|
|
|
<p>If there is no previous view, specify zero for the view number.</p></dd>
|
|
|
|
<dt><strong>View type</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>The type of view being created. Not all view types need be present in the view information. View type can be one of the following values:</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<td valign="top"><em>*TEXT</em></td>
|
|
<td valign="top">The view may contain supplied text as a result of macro expansions. Text may also come from a previous view or from files.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>*LISTING</em></td>
|
|
<td valign="top">Text for this view comes entirely from supplied text. Thus, the entire text for this view is encapsulated with the view debug data and is not dependent on the existence of source files.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>*STATEMENT</em></td>
|
|
<td valign="top">This view has no source text. Instead, the text of the view consists of HLL statement number, statement type, and the procedure dictionary ID. This view is necessary because breakpoint positions are given in terms of positions in this view.</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Input/output</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>Indicates whether the view is an input view, an output view, or an intermediate view. An input view is the view created from the output of the previous processor, or the view created from the root source file. It is not necessary for each processor to have an input view.</p>
|
|
|
|
<p>An output view is the view created by the processor to be input to the next processor. If a processor creates views that will not be used by any subsequent processors, then no output view is specified.</p>
|
|
|
|
<p>The allowable values for this parameter are:</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<td valign="top"><em>*INPUT</em></td>
|
|
<td valign="top">The view is an input view. This means that it must come from a root source file created by the user or by a previous processor, generally the input file specified on Start View Creation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>*OUTPUT</em></td>
|
|
<td valign="top">The view is an output view. This means that it forms the text of a view that may be read by a subsequent processor, and is generally stored in the output file specified on Start View Creation.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>blank</em></td>
|
|
<td valign="top">The view is neither an input nor an output view, but is an intermediate view produced by the processor.</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Create map</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>Specifies whether the using program will be supplying mapping information for this view, or whether the source debugger support should infer (create) the mapping at the time the text is described.</p>
|
|
|
|
<p>The purpose of the automatic mapping is to allow the ease of creating an include view. An include view has a previous view (usually the input view) which consists of only one file. The include view gets its text from this file and from include files.</p>
|
|
|
|
<p>This parameter applies only when the view type specified in the previous parameter is *TEXT, and when this view has a previous view. A map can then be inferred from the previous view to this view. To do so, the following criteria must be met:</p>
|
|
|
|
<ul>
|
|
<li>This view must contain text from the previous view whenever possible.</li>
|
|
|
|
<li>The first file specified on the QteAddViewFile API call for this view must be the file which is equivalent to the previous view.</li>
|
|
|
|
<li>When constructing the include view, the line with the include statement must never be included in the text of the view. Instead, it is replaced with the file that is specified.</li>
|
|
</ul>
|
|
|
|
<p>Create map can be one of the following values:</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="10 90" -->
|
|
<tr>
|
|
<td valign="top"><em>*YES</em></td>
|
|
<td valign="top">The source debugger support should infer the map between this *TEXT view and its previous view based on the text added with the QteAddViewText API. This is the only map to this view that is inferred.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>*NO</em></td>
|
|
<td valign="top">The program creating this *TEXT view uses the QteAddViewMap API to provide mapping information for this view.</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>View description</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(50)
|
|
|
|
<p>A character string that describes the view being created. The source debugger has the option of displaying this text with the view for identification purposes. The description should be left-justified.</p></dd>
|
|
|
|
<dt><strong>View number</strong></dt>
|
|
|
|
<dd>OUTPUT; BINARY(4)
|
|
|
|
<p>A number used to identify the view. Other APIs must be passed this number when they require a view.</p></dd>
|
|
|
|
<dt><strong>Error code</strong></dt>
|
|
|
|
<dd>I/O; CHAR(*)
|
|
|
|
<p>The structure in which to return error information. For the format of the structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p></dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Error Messages</h3>
|
|
|
|
<table width="100%" cellpadding="3">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<th align="left" valign="top">Message ID</th>
|
|
<th align="left" valign="top">Error Message Text</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CF1 E</td>
|
|
<td valign="top">Error code parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CF2 E</td>
|
|
<td valign="top">Error(s) occurred during running of &1 API.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9547 E</td>
|
|
<td valign="top">Previous view not correct.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9549 E</td>
|
|
<td valign="top">Error addressing API parameter.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF954B E</td>
|
|
<td valign="top">Statement view already exists.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF954D E</td>
|
|
<td valign="top">View type not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9555 E</td>
|
|
<td valign="top">Create Map parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9556 E</td>
|
|
<td valign="top">API not valid at this time.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF955A E</td>
|
|
<td valign="top">Input Output parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF955D E</td>
|
|
<td valign="top">View data overflow. All debug data lost.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V3R1
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center">
|
|
<a href="#top_Of_Page">Top</a> |
|
|
<a href="debug1.htm">Debugger APIs</a> |
|
|
<a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<br>
|
|
</body>
|
|
</html>
|
|
|