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

467 lines
14 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>Put Spooled File Data (QSPPUTSP) 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>Put Spooled File Data (QSPPUTSP) API</h2>
<div class="box" style="width: 65%;">
<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">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 Put Spooled File Data (QSPPUTSP) API puts data into a spooled file,
which was created using the Create Spooled File (QSPCRTSP) API. The data put in
the spooled file is taken from a user space. The data in the user space can be
created using the Get Spooled File Data (QSPGETSP) API or can be created by a
user application.</p>
<p>Before a buffer is put in a spooled file, a limited validity check is
performed on the information in the user space for that buffer. The possible
errors that result from the values of the fields in the user space can be
classified as follows:</p>
<ul>
<li>The value with an error can be substituted by the default value. A CPIxxxx
message is issued informing the user of the substitution.</li>
<li>The value with an error causes a CPFxxxx message to be issued. The message
is not issued until the validation of the information is complete or a severe
error is encountered and validation cannot continue. This provides the caller
with all informational messages as well as the first CPFxxxx message
encountered.</li>
<li>The value with an error causes a CPFxxxx message to be issued
immediately.</li>
</ul>
<p>The buffers must be in the format returned by the Get Spooled File Data
(QSPGETSP) API and be in format SPFR0200.</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>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 QSPCRTSP API.</p>
</dd>
<dt><strong>Qualified user space name</strong></dt>
<dd>INPUT; CHAR(20)
<p>The name of the user space that contains the buffer of spooled information.
The first 10 characters contain the user space name, and the second 10
characters contains 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
entries are left-justified. If no library is specified as the current library
of the job, QGPL is used. The format of the user space is the same as that
returned by QSPGETSP API. The format specified must be SPFR0200.</p>
<p>To see the format of the user space and how the offset values are
calculated, see <a href="QSPGETSP.htm#HDRUSERSPF">Format of the User
Space</a>.</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>Considerations When Changing or Creating a User Space</h3>
<p>When creating your own spooled files or altering the buffers returned by the
QSPGETSP API, incorrect data can be put with the QSPPUTSP API. Although errors
are caught by the QSPPUTSP API, not all errors are detected.</p>
<p>If the order of the pages, the number of pages, or the number of lines is
incorrect, problems can occur when repositioning the spooled file to print it.
Repositioning means trying to start printing at a specific page other than page
1. The problems can be caused by:</p>
<ul>
<li>Using the restart printing function</li>
<li>Changing the starting and ending print pages</li>
<li>Working with an inquiry error message that allows a user to specify what
page of the spooled file to restart printing</li>
</ul>
<p>There are fields in the buffer section of the user space that, if they
contain incorrect values, could cause other functions, such as displaying or
copying of spooled files, to work incorrectly. These fields are in the general
information section and in the page data section.</p>
<br>
<h3>Fields in the General Information Section</h3>
<p>If the state and IPDS data fields contain incorrect or changed values, the
Display Spooled File (DSPSPLF) and Copy Spooled File (CPYSPLF) commands can be
affected in the following ways:</p>
<ul>
<li>State field
<p>When this field is set to *HOMETRANS or *PAGETRANS, it indicates that the
spooled file contains only IPDS transparent data. This field only affects
spooled files with a device type of *IPDS.</p>
<p>A changed or incorrect state field value causes the DSPSPLF and CPYSPLF
commands to work the following way:</p>
<ul>
<li>DSPSPLF command
<p>IPDS transparent data cannot be displayed by the DSPSPLF command. As a
result, when the created spooled file is displayed, the data in the buffer with
the state field set to *HOMETRANS or *PAGETRANS is not displayed. Furthermore,
message CPI3438 <samp>(Intelligent Printer Data Stream (IPDS) data not
displayed)</samp> appears. If the spooled file is made up entirely of buffers
with the state field set to *HOMETRANS or *PAGETRANS, the spooled file is not
displayed. Message CPF3429 (File cannot be displayed or copied) is
displayed.</p>
</li>
<li>CPYSPLF command
<p>IPDS transparent data cannot be copied by the CPYSPLF command. If some
buffers of a spooled file have a state field set to *HOMETRANS or *PAGETRANS,
those buffers are not copied to the database member. If the spooled file is
made up entirely of buffers with the state field set to *HOMETRANS or
*PAGETRANS, the spooled file is not copied. Message CPF3429 (File cannot be
displayed or copied) is displayed.</p>
</li>
</ul>
</li>
<li>IPDS data field
<p>When this field is set to Y, it indicates that the buffer contains only IPDS
data. This field only affects spooled files with a device type of *SCS.</p>
<p>A changed or incorrect IPDS data field value causes the DSPSPLF and CPYSPLF
commands to work the following way:</p>
<ul>
<li>DSPSPLF command
<p>IPDS data cannot be displayed using the DSPSPLF command. As a result, when a
created spooled file is displayed, the data in the buffer with the IPDS data
field set to Y is not displayed. Furthermore, message CPI3437 (Intelligent
printer data stream (IPDS) data not displayed) appears at the bottom of the
last screen of the DSPSPLF command. If the spooled file is made up entirely of
buffers with the IPDS field set to Y, the spooled file is not displayed.
Message CPF3429 (File cannot be displayed or copied) is displayed.</p>
</li>
<li>CPYSPLF command
<p>IPDS data cannot be copied by using the CPYSPLF command. As a result, when a
spooled file is copied into the database member, the data in the buffer with
the IPDS data field set to Y is not copied. If the spooled file is made up
entirely of buffers with the IPDS field set to Y, the spooled file is not
copied. Message CPF3429 (File cannot be displayed or copied) is displayed.</p>
</li>
</ul>
</li>
</ul>
<br>
<h3>Fields in the Page Data Section</h3>
<p>If the text data start and page offset fields contain incorrect or changed
values, the Display Spooled File (DSPSPLF) command can be affected in the
following ways:</p>
<ul>
<li>Text data start
<p>The number of the first line where user data can start on the page. This
count includes text only. The text data start field can have an incorrect value
when the buffers of the original spooled file are put in the created spooled
file in an order other than the original spooled file. This field can also have
an incorrect value by simply changing its value to another value higher or
lower than was returned when the data was retrieved using the QSPGETSP API.
This field affects all device types of spooled files.</p>
<p>A changed or incorrect value for the text data start field causes the
DSPSPLF command to work the following way:</p>
<ul>
<li>DSPSPLF command
<p>When the text data start field contains an incorrect value, DSPSPLF may
issue message CPF33F9 (Error occurred while displaying file X number Y) when
attempting to find a particular string in the displayed spooled file. Also, the
user is able to see only part of the spooled file. The amount of data the user
sees depends on the order the buffers were put. For example, if the first
buffer of the original spooled file is the last buffer in the created spooled
file, the user only sees the pages in the first buffer of the created spooled
file. If the second buffer of the original spooled file was the last buffer in
the created spooled file, the user sees the pages in the first and second
buffer of the created spooled file. The other buffers are there but not
displayed.</p>
</li>
</ul>
</li>
<li>Page offset
<p>The location of the start of this page. The offset value is from the
beginning of the print data. This field affects all device types of spooled
files.</p>
<p>A changed or incorrect value for the page offset field causes the DSPSPLF
command to work the following way:</p>
<ul>
<li>DSPSPLF command
<p>When the page offset field contains an incorrect value, DSPSPLF may issue
informational message CPI3431 (Line number adjusted). The page information of
the individual pages overlaps. The user sees only part of the spooled file
because some pages overlap.</p>
</li>
</ul>
</li>
</ul>
<br>
<h3>Error Messages</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>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">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">CPF33D5 E</td>
<td align="left" valign="top">Spooled file not opened for operation
requested.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33F2 E</td>
<td align="left" valign="top">New page expected at beginning of buffer
&amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33F3 E</td>
<td align="left" valign="top">Data in buffer &amp;1 exceeds spooled file buffer
size.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33F4 E</td>
<td align="left" valign="top">Beyond end of user space &amp;1 in library
&amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33F6 E</td>
<td align="left" valign="top">Value in generic header of user space &amp;4 in
library &amp;5 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF33F7 E</td>
<td align="left" valign="top">Value in buffer &amp;6 of user space &amp;4 in
library &amp;5 not valid.</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>
<hr>
API introduced: V2R1
<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>