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

1541 lines
48 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>Get Spooled File Data (QSPGETSP) 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 Nov 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>Get Spooled File Data (QSPGETSP) 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%">Spooled file handle</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">Qualified user space name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(20)</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">Ordinal number of buffer to be read</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">End of open spooled file</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 Get Spooled File Data (QSPGETSP) API gets data from an existing spooled
file. The existing spooled file must have been opened previously by the Open
Spooled File (QSPOPNSP) API. Data is retrieved from the existing spooled file
by buffers (one or more) and stored in a user space. The data in the user space
is used as source to the Put Spooled File Data (QSPPUTSP) API. The number of
buffers returned in the user space is no greater than the value specified on
the number of buffers to get parameter on the Open Spooled File (QSPOPNSP)
API.</p>
<p>Depending on the data format requested, the actual number of bytes returned
for each buffer may vary from the size of the buffer. Format SPFR0300 may
return fewer bytes for each buffer than the actual buffer size. Format SPFR0200
may return more bytes because additional sections, such as the buffer
information, general information, and page data section are included. The
buffer size is in relation to the print data, not the other information
sections.</p>
<p>When creating the user space for the spooled file data, an initial user
space size that is calculated by adding the size of the generic header section
to the product of the buffer size (currently 4079 or 512) and the number of
buffers to get provides adequate space for format SPFR0300. However, this may
be too small for format SPFR0200. For format SPFR0200, the size of the user
space needed is variable based on the number of pages per buffer. Normally, a
good estimate for the user space size needed for SPFR0200 would be the number
of buffers multiplied by the buffer size plus 500 bytes. The user space is
automatically extended, if necessary, to allow all buffers requested to be
stored in the user space.</p>
<p>User spaces can be created using the Create User Space (QUSCRTUS) API. The
time it takes to create a user space is decreased if you specify to initialize
the space to hexadecimal zeros.</p>
<p>The maximum size of a user space is 16,776,704 bytes. If the data requested
exceeds this maximum size, message CPF3CAA is issued. The user space contains
accurate information for the number of buffers returned. To continue
processing, create another user space and call the QSPGETSP API again with the
new user space. Another alternative would be to return fewer buffers on each
call to the QSPGETSP API.</p>
<p><strong>Note:</strong> The size of the buffer (currently 512 or 4079 bytes)
is determined by the buffer size of the existing spooled file being worked
with. The spooled file buffer size is an attribute of the spooled file that can
be returned using format SPLA0200 with the QUSRSPLA API.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>User Space Authority</em></dt>
<dd>*CHANGE</dd>
<dt><em>Library Authority</em></dt>
<dd>*EXECUTE</dd>
<dt><em>Output Queue Authority</em></dt>
<dd>*USE</dd>
<dt><em>User Space Lock</em></dt>
<dd>*EXCLRD</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Spooled file handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The handle returned by the Open Spooled File (QSPOPNSP) API</p>
</dd>
<dt><strong>Qualified user space name</strong></dt>
<dd>INPUT; CHAR(20)
<p>The name of the user space that is to receive the buffer of spooled
information. The first 10 characters contain the user space name and the second
10 characters contain the name of the library in which the user space is
located. The special values allowed for the library name are *LIBL and *CURLIB.
Both user space name and library name are left-justified. If no library is
specified as the current library of the job, QGPL is used.</p>
</dd>
<dt><strong>Format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The format and the content of the information retrieved from each
buffer.<br>
The possible values are:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>SPFR0100</em></td>
<td align="left" valign="top">Information about the print data stored in the
buffer.</td>
</tr>
<tr>
<td align="left" valign="top"><em>SPFR0200</em></td>
<td align="left" valign="top">Information about the print data stored in the
buffer and the print data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>SPFR0300</em></td>
<td align="left" valign="top">Print data for the buffer or multiple
buffers.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Ordinal number of buffer to be read</strong></dt>
<dd>INPUT; BINARY(4)
<p>The buffer of the spooled file that is read first (or next).</p>
<p>Any number greater than zero is valid. When a specific buffer is requested,
only that buffer is returned.</p>
<p>The following special value is supported for this parameter:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>-1</em></td>
<td align="left" valign="top">Reads the next buffer in the spooled file.</td>
</tr>
</table>
<br>
<p>To read sequentially, starting at a specific buffer, the first API call
should specify the specific buffer, with subsequent calls of the API specifying
the special value -1 (read next). The first API call returns only the specific
buffer requested. The subsequent read operations, with -1 specified for the
next buffer, return the number of buffers specified on the open operation. When
reading an entire spooled file, the special value -1 should be used.</p>
<p>Performance degradation could happen if a specific buffer is always
used.</p>
</dd>
<dt><strong>End of open spooled file</strong></dt>
<dd>INPUT; CHAR(10)
<p>How to handle the situation where the spooled file has not been closed (by
this job or another job) and the requested data has not yet been written by the
application program.</p>
<p>The values supported for this parameter are:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*WAIT</em></td>
<td align="left" valign="top">The API waits until the requested data is
available or until the spooled file is closed. If the spooled file is closed
without the requested data becoming available, the action defined by *ERROR is
done.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*ERROR</em></td>
<td align="left" valign="top">The API returns either an error code or an error
message based on what was specified for the error code parameter.</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><a name="HDRUSERSPF">Format of the User Space</a></h3>
<p>The organization of the user space is dependent on the format (SPFR0100,
SPFR0200, or SPFR0300) used.</p>
<p><a href="#FIGSPFR100">Formats SPFR0100 and SPFR0200</a> shows the general
structure of the user space for formats SPFR0100 and SPFR0200. If SPFR0100 is
used, no print data is returned.</p>
<p><a href="#FIGSPFR300">Format SPFR0300</a> shows the structure for format
SPFR0300. If SPFR0300 is used, only the print data is returned, and print data
for the buffers requested is returned in one print data section.</p>
<p>Offset values are calculated from the beginning of the user space.</p>
<p><strong><a name="FIGSPFR100"></a></strong></p>
<p><img src="RBAFX568.gif" alt="Formats SPFR0100 and SPFR0200"> </p>
<p><strong><a name="FIGSPFR300">Format SPFR0300</a></strong></p>
<p><img src="Rv3f087.gif" alt="Format SPFR0300"></p>
<br>
<h3>Generic Header Section</h3>
<p>The following table shows the generic header information returned for the
SPFR0100, SPFR0200, and SPFR0300 formats.</p>
<p>For more details about the fields, see <a href="#HDRFD">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%">CHAR(64)</td>
<td align="left" valign="top" width="60%">Generic user area</td>
</tr>
<tr>
<td align="center" valign="top">64</td>
<td align="center" valign="top">40</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of header</td>
</tr>
<tr>
<td align="center" valign="top">68</td>
<td align="center" valign="top">44</td>
<td align="left" valign="top">CHAR(4)</td>
<td align="left" valign="top">Structure level</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="left" valign="top">CHAR(6)</td>
<td align="left" valign="top">Spooled file level</td>
</tr>
<tr>
<td align="center" valign="top">78</td>
<td align="center" valign="top">4E</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">Format of the information returned</td>
</tr>
<tr>
<td align="center" valign="top">86</td>
<td align="center" valign="top">56</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Information complete indicator</td>
</tr>
<tr>
<td align="center" valign="top">87</td>
<td align="center" valign="top">57</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">88</td>
<td align="center" valign="top">58</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of user space used</td>
</tr>
<tr>
<td align="center" valign="top">92</td>
<td align="center" valign="top">5C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to first buffer</td>
</tr>
<tr>
<td align="center" valign="top">96</td>
<td align="center" valign="top">60</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of buffers requested</td>
</tr>
<tr>
<td align="center" valign="top">100</td>
<td align="center" valign="top">64</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of buffers returned</td>
</tr>
<tr>
<td align="center" valign="top">104</td>
<td align="center" valign="top">68</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of print data</td>
</tr>
<tr>
<td align="center" valign="top">108</td>
<td align="center" valign="top">6C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of complete pages</td>
</tr>
<tr>
<td align="center" valign="top">112</td>
<td align="center" valign="top">70</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of first page</td>
</tr>
<tr>
<td align="center" valign="top">116</td>
<td align="center" valign="top">74</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to first page</td>
</tr>
<tr>
<td align="center" valign="top">120</td>
<td align="center" valign="top">78</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">Reserved</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFD">Field Descriptions</a></h3>
<p><strong>Format of the information returned.</strong> The SPFR0100, SPFR0200,
or SPFR0300 format of the data present.</p>
<p>For input to the QSPPUTSP API, this field should contain SPFR0200.</p>
<p><strong>Generic user area.</strong> Provided for the user's application
program.</p>
<p><strong>Information complete indicator.</strong> Used to indicate if all
information requested has been supplied.</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>I</em></td>
<td align="left" valign="top">Incomplete information. An interruption causes
the user space to contain incomplete information about a buffer or buffers. The
information for the last buffer is incomplete.</td>
</tr>
<tr>
<td align="left" valign="top"><em>P</em></td>
<td align="left" valign="top">Partial and accurate information. Partial
information is returned when the maximum user space was used and not all of the
buffers requested were read. Information is complete for the number of buffers
returned.</td>
</tr>
<tr>
<td align="left" valign="top"><em>C</em></td>
<td align="left" valign="top">Complete and accurate information. All the
buffers requested are read and returned. Complete also applies to the case
where the end of file was reached on a closed spooled file, but the number of
buffers requested was not reached.</td>
</tr>
</table>
<br>
<p>For input to the QSPPUTSP API, this field should contain a value of C or
P.</p>
<p><strong>Number of buffers requested.</strong> The number of buffer entries
requested for each read operation.</p>
<p>This is the number specified on the open operation. However, if a specific
buffer is requested by the read operation, this value is only one buffer.</p>
<p><strong>Number of buffers returned.</strong> The number of buffer entries
present in the user space.</p>
<p>As output from the QSPGETSP API, this number may be equal to or less than
the number of buffers requested. The number may be less because the end of a
closed spooled file is reached or the maximum user space has been used before
the requested buffer count has been processed.</p>
<p>As input to the QSPPUTSP API, this is the number of buffer entries present
in the user space. If this data is built by the user, rather than returned by
the QSPGETSP API, the user should specify the proper number of buffer entries
being provided to the QSPPUTSP API.</p>
<p><strong>Number of complete pages.</strong> The number of complete pages
contained in the print data.</p>
<p>This field is applicable to format SPFR0300 only.</p>
<p><strong>Number of first page.</strong> The number of the first page in the
print data section of format SPFR0300. The field is zero when no page is
starting in the print data returned or when the format is SPFR0100 and
SPFR0200.</p>
<p><strong>Offset to first buffer.</strong> The location of the data for the
first buffer returned. The offset value is from the beginning of the user
space. For formats SPFR0100 and SPFR0200, this is the offset to the first
buffer information section. For format SPFR0300, this is the offset to the
print data section.</p>
<p><strong>Offset to first page.</strong> The location of the data for the
beginning of the first page in the print data section of format SPFR0300. This
field is zero if the number of first page field is zero or the format is
SPFR0100 or SPFR0200.</p>
<p><strong>Reserved.</strong> Used to align a 4-byte boundary.</p>
<p><strong>Size of header.</strong> The size of the header section, excluding
the generic user area, of format SPFR0100, SPFR0200, or SPFR0300 in bytes.</p>
<p><strong>Size of print data.</strong> The size of the print data of format
SPFR0300 in bytes. This is zero for formats SPFR0100 and SPFR0200.</p>
<p><strong>Size of user space used.</strong> The number of bytes used
(returned) in the user space. This includes the generic header section, all
buffer information sections, all general information sections, all page data
sections, and all print data sections that are present in the user space.</p>
<p><strong>Spooled file level.</strong> The level of the spooled file in
Version, Release, Modification level format.</p>
<p><strong>Structure level.</strong> The level of the structure of the user
space. This should always be 0200.</p>
<br>
<h3>Buffer Information Section</h3>
<p>The following buffer information is returned by the QSPGETSP API. For more
details about the fields in the following table, see <a href="#HDRFD1">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%">Length of all buffer information</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">Ordinal number of the buffer</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">Offset to general information section</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">Size of general information section</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to page data section</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of page data section</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of page entries</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of page entry</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to print data section</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of print data section</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFD1">Field Descriptions</a></h3>
<p><strong>Length of all buffer information.</strong> The size of all
information pertaining to this buffer. This includes the sizes of the buffer
information section, general information section, page data section, and print
data section.</p>
<p><strong>Number of page entries.</strong> The number of page entries in the
page data section.</p>
<p><strong>Offset to general information section.</strong> The location of the
general information section. The offset value is from the beginning of the user
space.</p>
<p><strong>Offset to page data section.</strong> The location of the page data
information section. The offset value is from the beginning of the user
space.</p>
<p><strong>Offset to print data section.</strong> The location of the print
data section. The offset value is from the beginning of the user space.</p>
<p><strong>Ordinal number of the buffer.</strong> The ordinal number of the
buffer returned.</p>
<p><strong>Size of general information section.</strong> The size of the
general information section in bytes.</p>
<p><strong>Size of page data section.</strong> The size of the page data
section in bytes.</p>
<p><strong>Size of page entry.</strong> The size of each page entry.</p>
<p><strong>Size of print data section.</strong> The size of the print data
section in bytes. This is zero (0) for format SPFR0100 because this format does
not return this information. For data not previously spooled (creating as
opposed to copying) the print data buffer section cannot exceed the size of the
spooled file buffer minus the sum of the sizes of the following:</p>
<ul>
<li>Constant of 24<br>
</li>
<li>Size of page data section</li>
</ul>
<br>
<h3>General Information Section</h3>
<p>The general information section of formats SPFR0100 and SPFR0200 has the
following structure.</p>
<p>For more details about the fields in the following table, see
<a href="#HDRFD3">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%">Nonblank lines in buffer</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">Nonblank lines in first page</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">Buffer number of error information</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">Offset to error recovery information</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Size of print data</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">State</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Last page continues</td>
</tr>
<tr>
<td align="center" valign="top">31</td>
<td align="center" valign="top">1F</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Advanced print function file</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">LAC command array in buffer</td>
</tr>
<tr>
<td align="center" valign="top">33</td>
<td align="center" valign="top">21</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Any buffer had LAC</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Error recovery information contains LAC</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Error recovery information</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Zero pages</td>
</tr>
<tr>
<td align="center" valign="top">37</td>
<td align="center" valign="top">25</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Load font</td>
</tr>
<tr>
<td align="center" valign="top">38</td>
<td align="center" valign="top">26</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">IPDS data</td>
</tr>
<tr>
<td align="center" valign="top">39</td>
<td align="center" valign="top">27</td>
<td align="left" valign="top">CHAR(5)</td>
<td align="left" valign="top">Reserved</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFD3">Field Descriptions</a></h3>
<p>Format SPFR0200 is the format required by the Put Spooled File Data
(QSPPUTSP) API. When a spooled file is being copied, the information is
retrieved with the QSPGETSP API. When the spooled file is created by a user
application, all information in the format must be accurately provided.</p>
<p><strong>Advanced print function file.</strong> Whether this spooled file was
created by the AFP Utilities for iSeries licensed program. The value is N if the
device type is *SCS.</p>
<p><strong>Any buffer had LAC.</strong> Whether any buffer had an SCS Load
Alternate Characters (LAC) command since last error recovery information was
saved. Specify Y for yes and N for no. This should be set to N for all spooled
files with a DEVTYPE other than *SCS.</p>
<p><strong>Buffer number of error information.</strong> The number of the buffer containing the error recovery information. This should be zero when there is no buffer containing error recovery information or for all spooled files with a device type other than SCS.</p>
<p><strong>Error recovery information.</strong> Whether there is error recovery
information in this buffer for SCS commands. This error recovery information
allows a file to be repositioned and print only some pages of a file, making
sure the characters print using the proper code point. Information on the
proper code points is stored in LAC commands in the error recovery information.
This information is stored for each page that contains SCS commands that can
cause characters to print differently based on the code point specified.
Specify Y for yes and N for no. This should be set to N for all spooled files
with a device type other than SCS.</p>
<p><strong>Error recovery information contains LAC.</strong> Error recovery
information for SCS commands at the end of this page includes the LAC command
found later in the buffer. Specify Y for yes and N for no. This should be set
to N for all spooled files with a DEVTYPE other than SCS.</p>
<p><strong>IPDS data.</strong> Whether the buffer contains IPDS data. Specify Y
for yes and N for no. Buffers of IPDS data may exist in SCS spooled files.</p>
<p><strong>LAC command array in buffer.</strong> An LAC command exists in this
buffer. Specify Y for yes and N for no. This should be set to N for all spooled
files with a DEVTYPE other than SCS.</p>
<p><strong>Last page continues.</strong> The last page in this buffer continues
in the next buffer when the value is Y.</p>
<p><strong>Load font.</strong> Indicates whether a new load font equivalence
entry was added to the table for this buffer. Specify Y for yes and N for no.
This should be set to N for all spooled files with a device type other than
IPDS.</p>
<p><strong>Nonblank lines in buffer.</strong> The number of nonblank lines in
the buffer.</p>
<p><strong>Nonblank lines in first page.</strong> The number of nonblank lines
in the first page ending in the buffer.</p>
<p><strong>Offset to error recovery information.</strong> Offset to the error
recovery information in this buffer. This field is 0 for all spooled files with
a DEVTYPE other than SCS.</p>
<p><strong>Reserved.</strong> Reserved for byte alignment.</p>
<p><strong>Size of print data.</strong> The number of bytes of print data.</p>
<p><strong>State.</strong> The state the buffer ends in if the data is
IPDS.</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top">*HOME</td>
<td align="left" valign="top">Home state</td>
</tr>
<tr>
<td align="left" valign="top">*PAGE</td>
<td align="left" valign="top">Page state</td>
</tr>
<tr>
<td align="left" valign="top">*GRAPHICS</td>
<td align="left" valign="top">Graphics</td>
</tr>
<tr>
<td align="left" valign="top">*PAGETRANS</td>
<td align="left" valign="top">Page transparency</td>
</tr>
<tr>
<td align="left" valign="top">*HOMETRANS</td>
<td align="left" valign="top">Home transparency</td>
</tr>
<tr>
<td align="left" valign="top">blank</td>
<td align="left" valign="top">All non-IPDS files</td>
</tr>
</table>
<br>
<p><strong>Zero pages.</strong> Whether there are zero (0) pages in the spooled
file. Specify Y for yes and N for no.</p>
<br>
<h3>Page Data Section</h3>
<p>Each entry of the page data section of format SPFR0100 and SPFR0200 has the
following structure. For more details about the fields in the following table,
see <a href="#HDRFD4">Field Descriptions</a>.</p>
<p><strong>Note:</strong> One page data section entry is returned for each page
that starts in a returned buffer. The number of pages within a buffer may vary
depending on their sizes. Therefore, the number of page data section entries
may also vary from buffer to buffer.</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%">Text data start</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">Any data start</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">Page offset</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFD4">Field Descriptions</a></h3>
<p><strong>Any data start.</strong> The number of the first line where user
data can start on this page. This count includes all data to be printed.</p>
<p><strong>Page offset.</strong> The location of the start of this page. The
offset value is from the beginning of the print data.</p>
<p><strong>Text data start.</strong> Number of the first line where user data
can start on this page. This count includes text only.</p>
<br>
<h3>Print Data Section</h3>
<p>The print data section of format SPFR0200 and SPFR0300 has the following
structure. For more details about the fields in the following tables, see <a
href="#HDRFD5">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(*)</td>
<td align="left" valign="top" width="60%">Print data</td>
</tr>
</table>
<p>Print data for format SPFR0300 contains all the print data for all of the
buffers returned.</p>
<p>The format of the print text data is dependent on the printer device
type.</p>
<p>For printer device types of *AFPDS, *AFPDSLINE, and *LINE, the data for a
given format may span buffers. The first buffer returned will have one of the
following formats:</p>
<ul>
<li>Printer device type of *LINE with the control character field set to *NONE,
the TRC field set to N, and the record format name present in the data stream
set to N.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *LINE with the control character field set to *NONE,
the TRC field set to N, and the record format name present in the data stream
set to Y.<br>
<br>
<table border cellpadding="5">
<!-- cols="17 16 14 14 10 15 14" -->
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">Record format</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *LINE with the control character field set to *FCFC,
the TRC field set to N, and the record format name present in the data stream
set to N.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">CC</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *LINE with the control character field set to *FCFC,
the TRC field set to N, and the record format name present in the data stream
set to Y.<br>
<br>
<table border cellpadding="5">
<!-- cols="15 15 12 12 10 10 13 13" -->
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">CC</td>
<td align="left" valign="top">Record format</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *LINE with the control character field set to *NONE,
the TRC field set to Y, and the record format name present in the data stream
set to N.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">TRC</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *LINE with the control character field set to *FCFC,
the TRC field set to Y, and the record format name present in the data stream
set to N.<br>
<br>
<table border cellpadding="5">
<!-- cols="16 16 13 12 10 10 10 13" -->
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">CC</td>
<td align="left" valign="top">TRC</td>
<td align="left" valign="top">Line data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDS with the control character field set to
*FCFC. The TRC field does not apply and should be set to N. The original length
field is Y, and the 5A field is Y.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">5A</td>
<td align="left" valign="top">AFPDS data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDS with the control character field set to
*FCFC. The TRC field does not apply and should be set to N. The original length
field is Y, and the 5A attribute is N.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">AFPDS data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDS with the control character field set to
*FCFC. The TRC field does not apply and should be set to N. The original length
field is N, and the 5A field is Y.<br>
<br>
<table border cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top">5A</td>
<td align="left" valign="top">AFPDS data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDS with the control character field set to
*FCFC. The TRC field does not apply and should be set to N. The original length
field is N, and the 5A field is N.<br>
<br>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">AFPDS data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDSLINE with the control character field set to
*FCFC, the original length field set to Y, the 5A field set to Y, and the TRC
field set to N.
<p>*AFPDSLINE spooled files must have control characters and lengths.</p>
<br>
<table border cellpadding="5">
<!-- cols="18 17 15 15 10 10 15" -->
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">CC</td>
<td align="left" valign="top">Line data</td>
</tr>
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">5A</td>
<td align="left" valign="top">AFPDS data</td>
</tr>
</table>
<br>
</li>
<li>Printer device type of *AFPDSLINE with the control character field set to
*FCFC, the original length field set to Y, the 5A field set to Y, and the TRC
field set to Y.
<p>*AFPDSLINE spooled files must have control characters and lengths.</p>
<br>
<table border cellpadding="5">
<!-- cols="16 16 13 12 10 10 10 13" -->
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">CC</td>
<td align="left" valign="top">TRC</td>
<td align="left" valign="top">Line data</td>
</tr>
<tr>
<td align="left" valign="top">Original length</td>
<td align="left" valign="top">Trimmed length</td>
<td align="left" valign="top">Line number</td>
<td align="left" valign="top">DBCS flag</td>
<td align="left" valign="top">RSRVD</td>
<td align="left" valign="top">5A</td>
<td align="left" valign="top" colspan="2">AFPDS data</td>
</tr>
</table>
<br>
</li>
</ul>
<p>For a printer device type of *IPDS, the buffer has the following format:</p>
<table border cellpadding="5">
<tr>
<td align="left" valign="top">IPDS data</td>
</tr>
</table>
<p>For information on the buffer format of printer device type SCS, as well as
other device types, see the
<a href="../rzahg/rzahgprint.htm">Printing</a> topic.</p>
<br>
<h3><a name="HDRFD5">Field Descriptions</a></h3>
<p><strong>AFPDS data.</strong> CHAR(*): A variable length field describing the
structured fields that reside in the data stream. See the
<a href="http://www.ibm.com/support/docview.wss?uid=pub1sc31680206" target="_blank"> Data Stream and Object Architectures: Mixed Object Document Content Architecture Reference (MO:DCA Reference)</a>
<img src="www.gif" alt="Link outside Information Center"> for a description of these structured fields. When the
length fields are present, only one structured field can be contained in the
AFPDS data.</p>
<p><strong>CC.</strong> CHAR(1): Carriage control.</p>
<p>All codes are in hexadecimal notation. The carriage control characters
control writing, spacing, and skipping operations as the data is being
formatted. It may or may not precede the line data. See the <a href=
"../rzahg/rzahgprint.htm">Printing</a> topic for further information on the valid
carriage control codes.</p>
<p>When control characters exist, they can be one of two types: American
National Standard printer control characters or machine control characters.</p>
<p><strong>DBCS flag.</strong> CHAR(1): For DBCS files, whether this page
starts in IGC mode. This is determined by the leftmost bit of this field. This
should be zero for all lines except the first one on the page.</p>
<p><strong>IPDS data.</strong> CHAR(*): A variable length field describing the
structured fields that reside in the data stream. See the
<a href="http://www.ibm.com/support/docview.wss?uid=pub1s544341706" target="_blank">IPDS Reference</a><img src="www.gif" alt="Link outside Information Center"> for a description of these structures.</p>
<p><strong>Line data.</strong> CHAR(*): A variable length character field
composed of the actual characters to print.</p>
<p><strong>Line number.</strong> BINARY(2): The line number this page starts
on. This should be zero for all lines except the first one on the page.</p>
<p><strong>Original length.</strong> BINARY(2): The original length of the
record before trailing blanks were trimmed. This length does not include the
first 8 bytes of the record.</p>
<p><strong>Record format.</strong> CHAR(10): The name of the record format
found in the page definition specified on the spooled file's page definition
attribute that describes how the record of line data is to be formatted.</p>
<p><strong>RSRVD.</strong> CHAR(1): Reserved field.</p>
<p><strong>TRC.</strong> CHAR(1): A table-reference character.</p>
<p>All codes are in hexadecimal notation. A table-reference character selects a
font to be used when printing the line. See the <a href=
"../rzahg/rzahgprint.htm">Printing</a> topic for further information on the valid
table reference codes and how they relate to the CHARS attributes and page
definitions. If both CC and TRC are present, CC will be first and the TRC
character will be second. The absence or presence of these characters is
determined by the control character attribute and TRC attribute.</p>
<p><strong>Trimmed length.</strong> BINARY(2): The actual or trimmed length of
the record. This length does not include the first 8 bytes of the record.</p>
<p><strong>5A.</strong> CHAR(1): A special hexadecimal constant used to
indicate that a structured field follows.</p>
<br>
<h3>Restrictions for Print Data Section</h3>
<p>Some restrictions apply as to where these record formats can appear in the
buffer.</p>
<ul>
<li>For *LINE data records it is required that the original length, trimmed
length, control character, TRC character, and record format, if they exist, are
not split across buffers.</li>
<li>For *AFPDS data records it is required that the original length, trimmed
length, hex 5A control character, and the next 3 bytes of data are not split
across a buffer boundary.</li>
</ul>
<p>For other data types the print text format corresponds to the architecture
for that data stream.</p>
<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 align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CAA E</td>
<td align="left" valign="top">List is too large for user space &amp;1.</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">CPF3C21 E</td>
<td align="left" valign="top">Format name &amp;1 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">CPF33DF E</td>
<td align="left" valign="top">Internal data area for opened spooled files
destroyed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D2 E</td>
<td align="left" valign="top">Spooled file handle not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D3 E</td>
<td align="left" valign="top">Value &amp;1 not valid for buffer to read
parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D4 E</td>
<td align="left" valign="top">Value &amp;1 not valid for end of open file
parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D5 E</td>
<td align="left" valign="top">Spooled file not opened for operation
requested.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D6 E</td>
<td align="left" valign="top">Buffer &amp;1 not available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33D7 E</td>
<td align="left" valign="top">Requested number of buffers not returned.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3330 E</td>
<td align="left" valign="top">Necessary resource not available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF811A E</td>
<td align="left" valign="top">User space &amp;4 in &amp;9 damaged.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9801 E</td>
<td align="left" valign="top">Object &amp;2 in library &amp;3 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9802 E</td>
<td align="left" valign="top">Not authorized to object &amp;2 in &amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9803 E</td>
<td align="left" valign="top">Cannot allocate object &amp;2 in library
&amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9807 E</td>
<td align="left" valign="top">One or more libraries in library list
deleted.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9808 E</td>
<td align="left" valign="top">Cannot allocate one or more libraries on library
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9810 E</td>
<td align="left" valign="top">Library &amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9820 E</td>
<td align="left" valign="top">Not authorized to use library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9830 E</td>
<td align="left" valign="top">Cannot assign library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9846 E</td>
<td align="left" valign="top">Error while processing file &amp;1 in library
&amp;2.</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: V2R1
<hr>
<table align="center" cellpadding="2" cellspacing="2">
<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>