ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/strjrn.htm

445 lines
18 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">
<title>Start Journal (STRJRN)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="STRJRN.Top_Of_Page"></a>
<h2>Start Journal (STRJRN)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Yes
</td>
<td valign="top" align="right">
<a href="#STRJRN.PARAMETERS.TABLE">Parameters</a><br>
<a href="#STRJRN.COMMAND.EXAMPLES">Examples</a><br>
<a href="#STRJRN.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="STRJRN"></a>
<p>The Start Journal (STRJRN) command is used to start journaling changes (made to an object or list of objects) to a specific journal. The object types which are supported through this interface are Data Areas (*DTAARA), Data Queues (*DTAQ), Byte Stream Files (*STMF), Directories (*DIR), and Symbolic Links (*SYMLNK). Only objects of type *STMF, *DIR or *SYMLNK that are in the "root" (/), QOpenSys, and user-defined file systems are supported. For more information about the possible journal entries which can be sent, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>The user can specify that only the after image or both the before and the after images of an object of type *DTAARA be journaled. Before images are necessary to remove journaled changes using the Remove Journaled Changes (RMVJRNCHG) command.
</p>
<p>After journaling begins for the object, the user should save the journaled object to preserve its journal attribute information. Also, the object must be saved because, for example, journaled changes cannot be applied to a version of the object that was saved before journaling was in effect.
</p>
<p>For other ways to start journaling see the following commands:
</p>
<ul>
<li>Access Paths - Start Journal Access Path (STRJRNAP)
</li>
<li>Physical Files - Start Journal Physical File (STRJRNPF)
</li>
<li>Other Objects - Start Journal Object (STRJRNOBJ)
</li>
</ul>
<p><b>Restrictions:</b>
</p>
<ul>
<li>The object must not be journaling changes to another journal.
</li>
<li>The maximum number of objects that can be associated with one journal is either 250,000 or 10,000,000. To get 10,000,000, the value of *MAX10M must have been specified for the JRNOBJLMT parameter on either the Create Journal (CRTJRN) command or on the Change Journal (CHGJRN) command. If the number of objects is larger than this maximum, journaling does not start.
</li>
<li>The specified journal must be a local journal. Although all object types which can be journaled to a local journal can also have their changes sent to a remote journal, this is accomplished by a two step process. First start journaling to the local journal. Then connect the local journal to a remote instance. To initiate such a connection, use the Add Remote Journal (ADDRMTJRN) command or the Add Remote Journal (QjoAddRemoteJournal) API. For information about remote journaling, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</li>
<li>The specified journal and object must reside in the same Auxiliary Storage Pool (ASP).
</li>
<li>Byte stream files that are currently memory mapped, are virtual volume files, or are being used as IXS network storage spaces cannot be journaled.
</li>
<li>Objects that are internally marked as not eligible for journaling cannot be journaled. The system may mark system working directories that are created inside of user directories as not eligible for journaling.
</li>
<li>For data areas, only local external data area objects may be journaled. The special data areas (*LDA, *GDA, *PDA) and DDM data areas cannot be journaled.
</li>
<li>For data queues, only local data queues are supported. DDM data queues cannot be journaled.
</li>
<li>At least one of parameter OBJ or OBJFID must be specified.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="STRJRN.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#STRJRN.OBJ"><b>OBJ</b></a></td>
<td valign="top">Objects</td>
<td valign="top">Values (up to 300 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Name</td>
<td valign="top">
<i>Path name</i></td>
</tr>
<tr>
<td valign="top">Element 2: Include or omit</td>
<td valign="top">
<b><u>*INCLUDE</u></b>, *OMIT</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.OBJFID"><b>OBJFID</b></a></td>
<td valign="top">File identifier</td>
<td valign="top">Values (up to 300 repetitions): <i>Hexadecimal value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.JRN"><b>JRN</b></a></td>
<td valign="top">Journal</td>
<td valign="top"><i>Path name</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.SUBTREE"><b>SUBTREE</b></a></td>
<td valign="top">Directory subtree</td>
<td valign="top"><b><u>*NONE</u></b>, *ALL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#STRJRN.PATTERN"><b>PATTERN</b></a></td>
<td valign="top">Name pattern</td>
<td valign="top">Values (up to 20 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Pattern</td>
<td valign="top">
<i>Character value</i>, <b><u>*</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Include or omit</td>
<td valign="top">
<b><u>*INCLUDE</u></b>, *OMIT</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.INHERIT"><b>INHERIT</b></a></td>
<td valign="top">New objects inherit journaling</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.IMAGES"><b>IMAGES</b></a></td>
<td valign="top">Images</td>
<td valign="top"><b><u>*AFTER</u></b>, *BOTH</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#STRJRN.OMTJRNE"><b>OMTJRNE</b></a></td>
<td valign="top">Omit journal entry</td>
<td valign="top"><b><u>*NONE</u></b>, *OPNCLOSYN</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="STRJRN.OBJ"></a>
<h3>Objects (OBJ)</h3>
<p>Specifies a maximum of 300 objects for which changes are to be journaled. Only objects whose path name identifies an object of type *STMF, *DIR, *SYMLNK, *DTAARA or *DTAQ are supported.
</p>
<p><b>Element 1: Name</b>
</p>
<dl>
<dt><b><i>'object-path-name'</i></b></dt>
<dd>Specify the path name of the object for which changes are to be journaled.
<p>A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes. Symbolic links within the path name will not be followed. If the path name begins with the tilde character, then the path is assumed to be relative to the appropriate home directory.
</p>
<p>Additional information about path name patterns is in the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
</dd>
</dl>
<p><b>Element 2: Include or omit</b>
</p>
<p>The second element specifies whether names that match the pattern should be included or omitted from the operation. Note that in determining whether a name matches a pattern, relative name patterns are always treated as relative to the current working directory.
</p>
<dl>
<dt><b><u>*INCLUDE</u></b></dt>
<dd>The objects that match the object name pattern are to be journaled, unless overridden by an *OMIT specification.
</dd>
<dt><b>*OMIT</b></dt>
<dd>The objects that match the object name pattern are not be journaled. This overrides an *INCLUDE specification and is intended to be used to omit a subset of a previously selected path.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.OBJFID"></a>
<h3>File identifier (OBJFID)</h3>
<p>Specifies a maximum of 300 file identifiers (FID) for which changes are to be journaled. FIDs are a unique identifier associated with integrated file system related objects. This field is input in hexadecimal format. Only objects whose FID identifies an object of type *STMF, *DIR, *SYMLNK, *DTAARA or *DTAQ are supported.
</p>
<dl>
<dt><b><i>file-identifier</i></b></dt>
<dd>Objects identified with the FID are journaled.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.JRN"></a>
<h3>Journal (JRN)</h3>
<p>Specifies the path name of the journal that receives the journaled changes.
</p>
<dl>
<dt><b><i>'journal-path-name'</i></b></dt>
<dd>Specify the path name of the journal that receives the journaled changes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.SUBTREE"></a>
<h3>Directory subtree (SUBTREE)</h3>
<p>Specifies whether the directory subtrees are included in the start journal operation.
</p>
<p>
<b>Note: </b>This parameter is ignored if the OBJ parameter is not specified.
</p>
<p>
<b>Note: </b>This parameter is ignored unless object-path-name is a directory (*DIR) object.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>Only the objects that match the selection criteria are processed. The objects within selected directories are not implicitly processed.
</dd>
<dt><b>*ALL</b></dt>
<dd>All objects that meet the selection criteria are processed in addition to the entire subtree of each directory that matches the selection criteria. The subtree includes all sub-directories and the objects within those sub-directories.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.PATTERN"></a>
<h3>Name pattern (PATTERN)</h3>
<p>Specifies a maximum of 20 patterns to be used to include or omit objects for the start journal operation. If this parameter is not specified, the default will be to match all patterns.
</p>
<p>Only the last part of the path name will be considered for the name pattern match. Path name delimiters are not allowed in the name pattern. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes. Symbolic links within the path name will not be followed.
</p>
<p>If this parameter is not specified, the default will be to match all patterns.
</p>
<p>Additional information about path name patterns is in the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>
<b>Note: </b>This parameter is ignored if the OBJ parameter is not specified.
</p>
<p><b>Element 1: Pattern</b>
</p>
<dl>
<dt><b><u>'*'</u></b></dt>
<dd>All objects that match the input OBJ parameter are to be included into the start journal operation or omitted from the start journal operation.
</dd>
<dt><b><i>name-pattern</i></b></dt>
<dd>Specify the pattern to either include or omit objects for the start journal operation.
</dd>
</dl>
<p><b>Element 2: Include or omit</b>
</p>
<p>The second element specifies whether names that match the pattern should be included or omitted from the operation. Note that in determining whether a name matches a pattern, relative name patterns are always treated as relative to the current working directory.
</p>
<p>
<b>Note: </b>The SUBTREE parameter specifies whether the subtrees are included or omitted.
</p>
<dl>
<dt><b><u>*INCLUDE</u></b></dt>
<dd>The objects that match the object name pattern are included into the start journal operation unless overridden by an *OMIT specification.
</dd>
<dt><b>*OMIT</b></dt>
<dd>The objects that match the object name pattern are not to be included into the start journal operation. This overrides an *INCLUDE specification and is intended to be used to omit a subset of a previously selected pattern.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.INHERIT"></a>
<h3>New objects inherit journaling (INHERIT)</h3>
<p>Specifies whether new objects created within a journaled directory should inherit the journal options and the journal state of its parent directory.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>New objects created within the directory will not inherit the journal options and journal state of the parent directory.
</dd>
<dt><b>*YES</b></dt>
<dd>New objects created within the directory will inherit the journal options and journal state of the parent directory.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.IMAGES"></a>
<h3>Images (IMAGES)</h3>
<p>Specifies the kinds of images that are written to the journal receiver for changes to objects.
</p>
<dl>
<dt><b><u>*AFTER</u></b></dt>
<dd>Only <i>after</i> images are generated for changes to objects.
</dd>
<dt><b>*BOTH</b></dt>
<dd>The system generates both <i>before</i> and <i>after</i> images for changes to objects.
<p>
<b>Note: </b>The value *BOTH is only valid for *DTAARA objects.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRJRN.OMTJRNE"></a>
<h3>Omit journal entry (OMTJRNE)</h3>
<p>Specifies the journal entries that are omitted.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No entries are omitted.
</dd>
<dt><b>*OPNCLOSYN</b></dt>
<dd>Open, close and force entries are omitted. Open, close and force operations on the specified objects do not generate open, close and force journal entries. This prevents the use of TOJOBO and TOJOBC entries on the Apply Journaled Changes (APYJRNCHG) command, but it saves some storage space in the journal receivers.
<p>
<b>Note: </b>The value *OPNCLOSYN is only valid for *DIR and *STMF objects.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRJRN.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Start Journaling with Omit of Directory</b>
</p>
<p>
<pre>
STRJRN OBJ(('/mypath' *INCLUDE)
('/mypath/myobject' *OMIT))
JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN')
</pre>
</p>
<p>This command journals all changes to all objects supported by this command within the first-level of directory '/mypath' except '/mypath/myobject' to journal '/QSYS.LIB/MYLIB.LIB/JRNA.JRN'. None of the objects within the subdirectories of '/mypath' will be journaled.
</p>
<p>Only the <i>after</i> images of updated records are written to the journal.
</p>
<p><b>Example 2: Start Journaling with Pattern Matching</b>
</p>
<p>
<pre>
STRJRN OBJ(('/mypath' *INCLUDE)
('/mypath/myobject.txt' *OMIT))
JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN') SUBTREE(*ALL)
PATTERN(('*.TXT' *INCLUDE)) OMTJRNE(*OPNCLOSYN)
</pre>
</p>
<p>This command journals changes to all objects that match pattern '*.txt' in directory '/mypath' except object '/mypath/myobject.txt'. The open, close and force entries are not journaled.
</p>
<p>Only the <i>after</i> images of updated records are written to the journal.
</p>
<p><b>Example 3: Start Journaling with Omit by Pattern</b>
</p>
<p>
<pre>
STRJRN OBJ(('/mypath/my*' *INCLUDE))
JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN')
PATTERN(('*.DTA*' *OMIT))
</pre>
</p>
<p>This command journals changes to all objects within the first-level directories that match the pattern for path '/mypath/my*' and will omit all objects that match pattern '*.DTA*' (objects of type *DTAARA and *DTAQ).
</p>
<p>Only the <i>after</i> images of updated records are written to the journal.
</p>
<p><b>Example 4: Start Journaling using File Identifiers</b>
</p>
<p>
<pre>
STRJRN OBJFID(00000000000000007E09BDB000000009
00000000000000009E09BDB00000000A)
JRN('/QSYS.LIB/MYLIB.LIB/JRNLA.JRN')
</pre>
</p>
<p>This command journals all changes to the objects represented by the specified file identifiers to journal '/QSYS.LIB/MYLIB.LIB/JRNLA.JRN'.
</p>
<p>Only the <i>after</i> images of updated records are written to the journal.
</p>
<p><b>Example 5: Start Journaling on a Set of Data Queues</b>
</p>
<p>
<pre>
STRJRN OBJ(('/QSYS.LIB/MYLIB.LIB/MYDATA*.DTAQ'))
JRN('/QSYS.LIB/MYLIB.LIB/MYJRN.JRN')
</pre>
</p>
<p>This command starts the journaling of all changes to the objects of type *DTAQ in library MYLIB that begin with the characters 'MYDATA'.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRJRN.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPFA0D4</b></dt>
<dd>File system error occurred. Error number &amp;1.
</dd>
<dt><b>CPF700A</b></dt>
<dd>&amp;1 of &amp;2 objects have started journaling.
</dd>
<dt><b>CPF705A</b></dt>
<dd>Operation failed due to remote journal.
</dd>
<dt><b>CPF9801</b></dt>
<dd>Object &amp;2 in library &amp;3 not found.
</dd>
<dt><b>CPF9802</b></dt>
<dd>Not authorized to object &amp;2 in &amp;3.
</dd>
<dt><b>CPF9803</b></dt>
<dd>Cannot allocate object &amp;2 in library &amp;3.
</dd>
<dt><b>CPF9810</b></dt>
<dd>Library &amp;1 not found.
</dd>
<dt><b>CPF9820</b></dt>
<dd>Not authorized to use library &amp;1.
</dd>
<dt><b>CPF9825</b></dt>
<dd>Not authorized to device &amp;1.
</dd>
<dt><b>CPF9830</b></dt>
<dd>Cannot assign library &amp;1.
</dd>
<dt><b>CPF9873</b></dt>
<dd>ASP status is preventing access to object.
</dd>
<dt><b>CPF9875</b></dt>
<dd>Resources exceeded on ASP &amp;1.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRJRN.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>