ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaiu_5.4.0.1/rzaiurzaiu140.htm

146 lines
8.6 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Save and restore spooled files" />
<meta name="DC.Relation" scheme="URI" content="rzaiurzaiu272.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaiurzaiu267.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaiurzaiu269.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzalu/rzalusavrstsplf.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaiu140" />
<meta name="DC.Language" content="en-us" />
<!-- 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. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Save and restore spooled files</title>
</head>
<body id="rzaiu140"><a name="rzaiu140"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Save and restore spooled files</h1>
<div><div class="section"><img src="./delta.gif" alt="Start of change" /><p>Save and restore spooled files and all of their attributes.
Prior to V5R4M0, you must use indirect methods to <a href="../rzalu/rzalusavrstsplf.htm">save
and restore spooled files</a>. These indirect methods may not preserve
all of the attributes. This table summarizes the methods.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Save
and restore spooled files</caption><thead align="left"><tr valign="bottom"><th valign="bottom" width="33.33333333333333%" id="d0e34">Restore Methods</th>
<th valign="bottom" width="33.33333333333333%" id="d0e36">Method descriptions</th>
<th valign="bottom" width="33.33333333333333%" id="d0e38">Spooled file attributes preserved</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e34 ">SAVLIB, SAVOBJ commands SAVRSTLIB, SAVRSTOBJ commands <a href="../apis/qsrsavo.htm">QSRSAVO </a>API Save menu options
21-23</td>
<td valign="top" width="33.33333333333333%" headers="d0e36 ">RSTLIB, RSTOBJ commands SAVRSTLIB, SAVRSTOBJ commands
QSRRSTO API Restore menu options 21-23</td>
<td valign="top" width="33.33333333333333%" headers="d0e38 ">Data and all attributes</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e34 "><a href="../apis/QSPOPNSP.htm"> QSPOPNSP</a>, <a href="../apis/QSPGETSP.htm"> QSPGETSP</a>, <a href="../apis/QUSRSPLA.htm"> QUSRSPLA</a> APIs</td>
<td valign="top" width="33.33333333333333%" headers="d0e36 "><a href="../apis/QSPCRTSP.htm">QSPCRTSP</a>, <a href="../apis/QSPPUTSP.htm">QSPPUTSP</a>, <a href="../apis/QSPCLOSP.htm">QSPCLOSP</a> APIs</td>
<td valign="top" width="33.33333333333333%" headers="d0e38 ">Data, but not all attributes</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e34 "><a href="../cl/cpysplf.htm">CPYSPLF</a>,
SAVOBJ commands</td>
<td valign="top" width="33.33333333333333%" headers="d0e36 ">CPYF command</td>
<td valign="top" width="33.33333333333333%" headers="d0e38 ">Textual data only</td>
</tr>
</tbody>
</table>
</div>
<p>When you save an output queue with the save commands, menu, or
QSRSAVO API, you can choose to save all its spooled files. You can do this
by specifying *ALL for the Spooled file data (SPLFDTA) command parameter,
menu prompt or API key. When you restore output queues with the restore commands,
menu, or QSRRSTO API, you can choose to restore any saved spooled files that
do not already exist on the system. You can do this by specifying *NEW for
the SPLFDTA parameter, prompt, or key. With the QSRSAVO and QSRRSTO APIs,
you can also choose to save or restore spooled files by using a set of selection
criteria. If you save spooled files with the QSRSAVO API using selection criteria
and the *SPLF special library value, then you must use the QSRRSTO API with
the *SPLF special library value to restore the spooled files. </p>
<div class="p">This
example describes how to save spooled files:<ol><li>Create an output queue to store the spooled files. <pre>CRTOUTQ OUTQ(lib-name/que-name) </pre>
</li>
<li>Use the Work with Spooled File (WRKSPLF) command to list the spooled files.</li>
<li>Use option 2, Change Spooled File Attributes (CHGSPLFA) command to move
the spooled files you wish to save to the output queue you created.</li>
<li>Use the Save Object (SAVOBJ) command to save the spooled file data. <pre>SAVOBJ OBJ(que-name) LIB(lib-name) DEV(dev-name) OBJTYPE(*OUTQ) SPLFDTA(*ALL)</pre>
</li>
</ol>
</div>
<div class="p">This example describes how to restore spooled files:<ol><li>Restore spooled files that are not already on the system.<pre>RSTOBJ OBJ(que-name) SAVLIB(lib-name) DEV(dev-name)
OBJTYPE(*OUTQ) SPLFDTA(*NEW)</pre>
</li>
</ol>
</div>
<img src="./deltaend.gif" alt="End of change" /></div>
<div class="section"><h4 class="sectiontitle">Using spooled file APIs</h4><p>If your source or target
system is earlier than V5R4M0, you can use spooled file APIs as an indirect
method to save and restore spooled files. This method preserves the spooled
file data stream but not all of the attributes.</p>
<div class="p">To save spooled files: <ul><li>The spooled files are opened using the Open Spooled File (QSPOPNSP) API.
</li>
<li>The spooled file data is retrieved using the Get Spooled File Data (QSPGETSP)
API. </li>
<li>The spooled file attributes are retrieved using the User Spooled File
Attributes (QUSRSPLA)API.</li>
</ul>
</div>
<div class="p">To restore spooled files:<ol><li>The spooled files are created using the Create Spooled File (QSPCRTSP)
API . </li>
<li>The spooled file data is written to a new spooled file using the Put Spooled
File Data (QSPPUTSP) API. </li>
<li>The spooled file is closed using the Close Spooled File (QSPCLOSP) API.</li>
</ol>
</div>
<p>The <a href="../apis/qsrsavo.htm">System API
Reference</a> in the iSeries™ Information Center includes information about
these APIs. You can find an example and a tool for using these APIs in the
QUSRTOOL library in the TSRINFO member of the QATTINFO file.</p>
</div>
<div class="section"><h4 class="sectiontitle">Copying spooled files to database files</h4><p>If your
source or target system is earlier than V5R4M0, you can copy data between
spooled files and database files as an indirect method to save and restore
spooled files. This method copies textual data only and not advanced function
attributes such as graphics and variable fonts. This method does not provide
a complete solution for saving your spooled files. </p>
<p>The Copy Spooled
File (CPYSPLF) command saves spooled file data to a database file. The Copy
File (CPYF) command can copy data from a database file to a spooled file.
Refer to <a href="../books/sc415304.pdf" target="_blank">Restoring Previous
Release User Data to a New System</a> in the Backup and Recovery book for
more details.</p>
<p><a href="rzaiurzaiu2tv.htm">View Entire GO SAVE checklist</a>in
the iSeries Information
Center includes more information about menu options 21, 22, and 23 of the
GO SAVE command.</p>
<p>Refer to <a href="../rzamm/rzammrprint.htm">Print
restrictions</a> in the Information center within the Print topic for restrictions
of saving and restoring spooled files.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaiurzaiu272.htm">Save user data in your server</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="rzaiurzaiu267.htm">Save your entire server with GO SAVE: Option 21</a></div>
<div><a href="rzaiurzaiu269.htm">Save user data with GO SAVE: Option 23</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../rzalu/rzalusavrstsplf.htm">Save and restore spooled files</a></div>
</div>
</div>
</body>
</html>