ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QOCCTLOF.htm

197 lines
6.8 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>Control Office Services (QOCCTLOF) 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. -->
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited October 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>Control Office Services (QOCCTLOF) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;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%">Request type</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">2</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>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Control Office Services (QOCCTLOF) API makes requests of the office services. Office services accepts the following actions:</p>
<ul>
<li>*START</li>
<li>*END</li>
<li>*CHECK</li>
</ul>
<p>An office services block is defined as a time during an application that the application knows that it will be using more office commands. By starting an office services block, the application is informing office that it will do several office tasks. The application will also inform office when to close the office files, destroy the working spaces, and so forth. It closes the files by ending an office services block. The application uses the QOCCTLOF to start and end an office services block.</p>
<p>For example, assume you have a program that issues 10 calendar CL commands. Each CL command must open office files and create work spaces that it needs before processing the request. The CL command must then close the office files that were opened and destroy the work spaces created before exiting. In this case, the files would be opened and closed and the work spaces created and destroyed 10 times, once for each CL command. With the QOCCTLOF API, you can improve the performance of this program by starting an office services block at the beginning of the program, issuing the CL commands and then ending the office services block. This enables the files to be opened and closed and the work spaces to be created and destroyed only once.</p>
<p>With the QOCCTLOF API, you can improve the performance of this program as follows:</p>
<ul>
<li>Use the QOCCTLOF API to start an office services block</li>
<li>Issue the 10 calendar CL commands</li>
<li>Use the QOCCTLOF API to end the office services block</li>
</ul>
<p>All calendar CL commands can make use of this API.</p>
<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>Request type</strong></dt>
<dd>INPUT; CHAR(10)
<p>The request that the application makes of the office services. The following are the possible values:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td valign="top"><em>*START</em></td>
<td valign="top">Start an office services block. An office services block is the time during the running of an application when more office commands will be used. Office services leaves the job in such a state as to maximize the performance of subsequent office services use. This includes leaving the office files open and leaving working spaces created and already initialized. It is the responsibility of the application to end the office services block.</td>
</tr>
<tr>
<td valign="top"><em>*END</em></td>
<td valign="top">End an office services block. No further office services will be used. The files will be closed and all working spaces deleted.</td>
</tr>
<tr>
<td valign="top"><em>*CHECK</em></td>
<td valign="top">Determine if an office services block is active. An error will be returned if an office services block has not been previously started or has already ended.</td>
</tr>
</table>
<br>
</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">CPF3C90 E</td>
<td valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td valign="top">Program or service program &amp;1 in library &amp;2
ended. Reason code &amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">OFCFD01 E</td>
<td valign="top">Office services session is already active.</td>
</tr>
<tr>
<td align="left" valign="top">OFCFD02 E</td>
<td valign="top">Office services session request failed.</td>
</tr>
<tr>
<td align="left" valign="top">OFCFD03 E</td>
<td valign="top">Office services session is not active.</td>
</tr>
<tr>
<td align="left" valign="top">OFCFD04 E</td>
<td valign="top">Office services session request is not correct.</td>
</tr>
<tr>
<td align="left" valign="top">OFCFD05 E</td>
<td valign="top">Number of bytes provided for the error code is not
correct.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R2
<hr>
<table cellpadding="2" cellspacing="2" align="center">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a
href="off1a.htm">Office APIs</a> | <a href=
"aplist.htm">APIs by category</a></td>
</tr>
</table>
</body>
</html>