153 lines
9.7 KiB
HTML
153 lines
9.7 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="concept" />
|
||
<meta name="DC.Title" content="Example: Apply journaled changes" />
|
||
<meta name="abstract" content="The following are examples of the Apply Journaled Changes (APYJRNCHG) command applied to a database physical file, integrated file system object, data queues, and data area." />
|
||
<meta name="description" content="The following are examples of the Apply Journaled Changes (APYJRNCHG) command applied to a database physical file, integrated file system object, data queues, and data area." />
|
||
<meta name="DC.Relation" scheme="URI" content="rzakiapyjrnchg.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="../cl/apyjrnchg.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="rzakiapychgexmpl" />
|
||
<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>Example: Apply journaled changes</title>
|
||
</head>
|
||
<body id="rzakiapychgexmpl"><a name="rzakiapychgexmpl"><!-- --></a>
|
||
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Example: Apply journaled changes</h1>
|
||
<div><p>The following are examples of the Apply Journaled Changes (APYJRNCHG)
|
||
command applied to a database physical file, integrated file system object,
|
||
data queues, and data area.</p>
|
||
<div class="p">The following examples show database physical files, data areas, and integrated
|
||
file system objects being processed separately. However, you can use one APYJRNCHG
|
||
command if you use the OBJ parameter for files and data areas, and the OBJPATH
|
||
parameter for the integrated file system objects on one command call.<div class="note"><span class="notetitle">Note:</span> By
|
||
using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code
|
||
license and disclaimer information</a>.</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">All journaled objects</h4><p>This example recovers all
|
||
objects that are journaled to the journal JRN2 in one apply operation. For
|
||
this example, assume that journal JRN2 is using the receiver size-option RCVSIZOPT(*MAXOPT3).
|
||
Since the ending sequence number is greater than 9 999 999 999,
|
||
the TOENTLRG parameter is required. The example starts applying journaled
|
||
changes from the last save of the objects, to entry sequence number 500 000 000 000.</p>
|
||
<p><img src="./delta.gif" alt="Start of change" />By default, the system honors the commitment boundaries. So if
|
||
there is an object whose commitment boundary ends after sequence number 500 000 000 000,
|
||
the the apply operations will not apply any changes to that object for any
|
||
commit cycles that end after sequence number 500 000 000 000. The apply operation
|
||
continues for the other objects that are journaled to the journal.<img src="./deltaend.gif" alt="End of change" /></p>
|
||
<pre> APYJRNCHG JRN(JRN2) OBJ(*ALLJRNOBJ)
|
||
FROMENT(*LASTSAVE) TOENTLRG(500000000000)
|
||
RCVRNG(*LASTSAVE)</pre>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Database physical file</h4><p>The following command applies
|
||
the changes in journal JRNA to all the members of all files in the library
|
||
DSTPRODLIB that are being journaled to journal JRNA.</p>
|
||
<pre>APYJRNCHG JRN(JRNLIB/JRNA) FILE((DSTPRODLIB/*ALL))
|
||
FROMENTLRG(*LASTSAVE) TOENTLRG(*LASTRST)</pre>
|
||
<p><img src="./delta.gif" alt="Start of change" />Because
|
||
the RCVRNG parameter is not specified, the system determines the range of
|
||
journal receivers to use as a result of the save information for the files.
|
||
The FROMENTLRG parameter defaults to apply the changes that begin with the
|
||
first journal entry after the save of the object. The earliest required receiver
|
||
is the receiver that contains the D DW journal entry indicating the earliest
|
||
start of save entry for any file in DSTPRODLIB.<img src="./deltaend.gif" alt="End of change" /></p>
|
||
<p>If the file was last
|
||
saved with the save-while-active function, the saved copy of each file member
|
||
includes all object-level changes in the journal entries up to the corresponding
|
||
F SS journal entry. In this case, the system applies changes that begin with
|
||
the first journal entry that follows the F SS entry.</p>
|
||
<p>If the file was
|
||
last saved when it was not in use (normal save), the saved copy of each member
|
||
includes all object-level changes in the journal entries up to the corresponding
|
||
F MS member saved journal entry. In this case, the system applies changes
|
||
that begin with the first journal entry that follows the F MS entry. </p>
|
||
<p>The
|
||
following command applies the changes to the file from the journal receiver
|
||
that is currently attached to the journal:</p>
|
||
<pre>APYJRNCHG JRN(JRNLIB/JRNA) FILE((LIBA/FILEA MBR1))
|
||
RCVRNG(*CURRENT) FROMENTLRG(*FIRST)
|
||
TOENTLRG(*LASTRST) OUTPUT(*OUTFILE)
|
||
OUTFILE(MYFILE) DETAIL(*ERR)</pre>
|
||
<p>The *CURRENT journal
|
||
receiver is the journal receiver that is attached to journal JRNA at the beginning
|
||
of the operation. The system applies the changes from the first journal entry
|
||
in this receiver to the entry before the object was last restored. Changes
|
||
are applied to member MBR1 of the file FILEA.</p>
|
||
<p>Because OUTPUT(*OUTFILE)
|
||
is specified, an output file with the name MYFILE is created. The output file
|
||
contains a record for each object, if any, for which the apply ends early
|
||
because DETAIL(*ERR) is specified.</p>
|
||
<p>The following command applies the
|
||
changes in the journal JRNA to all members of the file FILEA beginning with
|
||
the first journal entry after the file member was last saved:</p>
|
||
<pre>APYJRNCHG JRN(JRNLIB/JRNA) FILE((LIBA/FILEA *ALL))
|
||
TOJOBC(000741/USERP/WORKSTP)</pre>
|
||
<p>The operation continues
|
||
until the specified job closes any of the members in the file that it opened.
|
||
The operation is not restricted only to those journal entries that are recorded
|
||
by the specified job.</p>
|
||
<div class="note"><span class="notetitle">Note:</span> This example works only if you do not specify
|
||
OMTJRNE (*OPNCLO) when starting journaling for the file and you did not specify
|
||
RCVSIZOPT(*MINFIXLEN) or you did not use a FIXLENDTA option that would have
|
||
omitted the job name for the journal at any time while the file was journaled).</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Integrated file system object</h4><p>The following command
|
||
applies the changes in journal JRNA to the objects in the directory MyDirectory,
|
||
and its subdirectories, that are being journaled to journal JRNA:</p>
|
||
<pre>APYJRNCHG JRN(JRNLIB/JRNA) OBJPATH(('/MyDirectory')) SUBTREE(*ALL)</pre>
|
||
<p>Because the RCVRNG parameter is not specified, the system determines the
|
||
range of journal receivers to use as a result of the save information for
|
||
the objects. Because the FROMENT or the FROMENTLRG parameters are not specified,
|
||
the system applies the changes that begin with the journal entry for the last
|
||
save of each of the objects.</p>
|
||
<p>If the object was last saved with the save-while-active
|
||
function, the saved copy of each object includes all changes in the journal
|
||
entries up to the corresponding B FW journal entry. In this case, the system
|
||
applies changes that begin with the first journal entry that follows the B
|
||
FW entry.</p>
|
||
<p>If the object was last saved when it was not in use (normal
|
||
save), the saved copy of each object includes all changes in the journal entries
|
||
up to the corresponding B FS saved journal entry. In this case, the system
|
||
applies changes that begin with the first journal entry that follows the B
|
||
FS entry.</p>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Data area</h4><p>The following command applies the changes
|
||
to the data area DATA1 from the journal receiver that is currently attached
|
||
to the journal:</p>
|
||
<pre>APYJRNCHG JRN(JRNLIB/JRNA) OBJ((LIBA/DATA1 *DTAARA))
|
||
RCVRNG(*CURRENT) FROMENTLRG(*FIRST)
|
||
TOENTLRG(*LASTRST)</pre>
|
||
<p>The *CURRENT journal receiver is
|
||
the journal receiver that is attached to journal JRNA at the beginning of
|
||
the operation. The system applies the changes from the first journal entry
|
||
in this receiver to the entry before the object was last restored. Changes
|
||
are applied to data area DATA1.</p>
|
||
<div class="note"><span class="notetitle">Note:</span> Read the Code example disclaimer
|
||
for important legal information.</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakiapyjrnchg.htm" title="One of the primary advantages of journaling is its ability to return a journaled object to its current state since the last save.">Recover journaled objects</a></div>
|
||
</div>
|
||
<div class="relref"><strong>Related reference</strong><br />
|
||
<div><a href="../cl/apyjrnchg.htm">Apply Journaled Changes (APYJRNCHG) command</a></div>
|
||
</div>
|
||
</div>
|
||
<img src="./deltaend.gif" alt="End of change" /></body>
|
||
</html> |