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

506 lines
14 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Extract Writer Status (QSPEXTWI) 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. -->
<!-- Print SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited by Kersten Oct 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>Extract Writer Status (QSPEXTWI) API</h2>
<div class="box" style="width: 70%;">
<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%">Receiver variable</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of receiver variable</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Writer handle</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(16)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Spooled file handle</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">6</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 Extract Writer Status (QSPEXTWI) API is used by a driver program to
access information about the writer, the spooled file the writer is processing,
and to determine if the information for the spooled file has been changed. A
call to this API should be made by a driver program after each buffer is sent
to the printer.</p>
<br>
<h3>Authorities and Locks</h3>
<p>None</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The receiver variable that receives the information requested. You can
specify the size of the area to be smaller than the format requested as long as
you specify the length parameter correctly. As a result, the API returns only
the data that the area can hold.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the receiver variable provided. The length of receiver
variable parameter may be specified up to the size of the receiver variable
specified in the user program. If the length of receiver variable parameter
specified is larger than the allocated size of the receiver variable specified
in the user program, the results are not predictable. The minimum length is 8
bytes.</p>
</dd>
<dt><strong>Format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The content and format of the writer information being returned.</p>
<p>You must specify one of the following:</p>
<table cellpadding="5">
<!-- cols="25 75" -->
<tr>
<td valign="top"><em><a href="#HDREXTW100">EXTW0100</a></em></td>
<td valign="top">Contains the information about the writer and the spooled file
it is processing.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Writer handle</strong></dt>
<dd>INPUT; CHAR(16)
<p>The handle to the writer job. This handle is provided to the driver program
on a writer call to the driver exit program at initialization time (the
initialize option).</p>
</dd>
<dt><strong>Spooled file handle</strong></dt>
<dd>INPUT; CHAR(10)
<p>The spooled file handle to the current file which is being processed by the
writer. This handle is provided to the driver program on a writer call to the
driver exit program (using the process file option).</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><a name="HDREXTW100">EXTW0100 Format</a></h3>
<p>The following table shows the information returned for the EXTW0100 format.
For more details about the fields in the following table see, <a href=
"#HDRFIELDD">Field Descriptions</a>.</p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes returned</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Bytes available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of additional copies</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Reposition page number</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Stop processing at page end</td>
</tr>
<tr>
<td align="center" valign="top">17</td>
<td align="center" valign="top">11</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Stop processing at end of copy</td>
</tr>
<tr>
<td align="center" valign="top">18</td>
<td align="center" valign="top">12</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Stop processing at page end, allow restart</td>
</tr>
<tr>
<td align="center" valign="top">19</td>
<td align="center" valign="top">13</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Stop processing at end of copy, allow
restart</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Stop processing at page end, file was
restarted</td>
</tr>
<tr>
<td align="center" valign="top">21</td>
<td align="center" valign="top">15</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">File held or deleted</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFIELDD">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The number of bytes of data available to
be returned. All available data is returned if enough space is provided.</p>
<p><strong>Bytes returned.</strong> The number of bytes of data returned.</p>
<p><strong>File held or deleted.</strong> The file has been held or deleted.
This could have been the result of a user executing a Hold Spooled File
(HLDSPLF) or Delete Spooled File (DLTSPLF) command while the file was active to
the writer. This could also be the result of a user executing a Hold Writer
(HLDWTR) command followed by executing a Release Writer (RLSWTR) command with
the *BYPASS option, while the file was active to the writer.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The file has not been held or deleted.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The file has been held or deleted.</td>
</tr>
</table>
<br>
<p><strong>Number of additional copies.</strong> The number of copies requested
to be printed. It is possible that the user could change the number of copies
to be printed using the Change Spooled File Attributes (CHGSPLFA) command.
Therefore the driver program must check the current number of copies. This
field has a range of values from 1 to 255. A special value of zero (0) is
returned if the number of copies has not changed.</p>
<p><strong>Reposition page number.</strong> The page where the writer is to
reposition the file. This field is set when the writer is restarted and is used
with the various stop processing flags.</p>
<p><strong>Stop processing at end of copy.</strong> Stop processing the file at
the end of the current copy. This can be set with an End Writer (ENDWTR)
command with the controlled option (*CNTRLD) specified.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The writer has not been ended with the controlled option.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The writer has been ended with the controlled option. When
this API is used within a print driver exit or writer transform exit program,
the exit program should finish the current copy of the file and return.</td>
</tr>
</table>
<br>
<p><strong>Stop processing at end of copy, allow restart.</strong> Stop
processing the file at the end of the current copy. Allow printing to restart.
This is set with the Hold Writer (HLDWTR) command with the controlled option
(*CNTRLD) specified.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The writer has not been held with the controlled option.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The writer has been held with the controlled option. When this
API is used within a print driver exit or writer transform exit program, the
exit program should finish the current copy of the file and return.</td>
</tr>
</table>
<br>
<p><strong>Stop processing at page end.</strong> Stop processing the file at
the end of the current page. This can be set with an End Writer (ENDWTR)
command with the page end option (*PAGEEND) specified.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The writer has not been ended with the page end option.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The writer has been ended with the page end option. When this
API is used within a print driver exit or writer transform exit program, the
exit program should finish the current page of the file and return.</td>
</tr>
</table>
<br>
<p><strong>Stop processing at page end, allow restart.</strong> Stop processing
the file at the end of the current page. Allow printing to restart. This is set
with the Hold Writer (HLDWTR) command with the page end option (*PAGEEND)
specified.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The writer has not been held with the page end option.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The writer has been held with the page end option. When this
API is used within a print driver exit or writer transform exit program, the
exit program should finish the current page of the file and return.</td>
</tr>
</table>
<br>
<p><strong>Stop processing at page end, file was restarted.</strong> The file
has restarted printing. It is possible that the user could restart printing the
file (CHGSPLFA). Therefore, the print driver program must check the Reposition
page number to determine where to restart printing.</p>
<p>Possible values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">The file has not restarted printing.</td>
</tr>
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">The file has started printing again.</td>
</tr>
</table>
<br>
<h3>Error Messages</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPF24B4 E</td>
<td width="85%" valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C19 E</td>
<td align="left" valign="top">Error occurred with receiver variable
specified.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C21 E</td>
<td align="left" valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C24 E</td>
<td align="left" valign="top">Length of the receiver variable is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33CC E</td>
<td align="left" valign="top">No writer found for specified handle &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33CD E</td>
<td align="left" valign="top">No file found for specified handle &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V3R7
<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=
"print1.htm">Print APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</body>
</html>