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

518 lines
18 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">
<title>Send Journal Entry (SNDJRNE)</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="SNDJRNE.Top_Of_Page"></a>
<h2>Send Journal Entry (SNDJRNE)</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="#SNDJRNE.PARAMETERS.TABLE">Parameters</a><br>
<a href="#SNDJRNE.COMMAND.EXAMPLES">Examples</a><br>
<a href="#SNDJRNE.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="SNDJRNE"></a>
<p>The Send Journal Entry (SNDJRNE) command is used to write a single journal entry to a specific journal. The entry can contain any information. The user may assign an entry type to the journal entry and may also associate the journal entry with a specified journaled object.
</p>
<p>If the journal currently has a state of *STANDBY, then the journal entry will not be deposited unless OVRSTATE(*STANDBY) is specified.
</p>
<p>The journal code for the entry is U, which indicates a user-specified journal entry.
</p>
<p>
<b>Note: </b>The Send Journal Entry (QJOSJRNE) Application Programming Interface (API) can also be used to write a user-specified journal entry to a specific journal. Using this API may improve performance and can provide additional function that is not available with this command. For more information, see the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p><b>Restrictions:</b>
</p>
<ul>
<li>If an object other than a file is specified, it must be currently journaled to the specified journal.
<p>If a file object is specified, it must either be currently journaled to the specified journal or it must have been last journaled to the specified journal.
</p>
</li>
<li>The specified journal cannot be a remote journal.
</li>
<li>The specified journal cannot have a journal state of *INACTIVE.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SNDJRNE.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="#SNDJRNE.JRN"><b>JRN</b></a></td>
<td valign="top">Journal</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Journal</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#SNDJRNE.TYPE"><b>TYPE</b></a></td>
<td valign="top">Journal entry type</td>
<td valign="top"><i>Character value</i>, <b><u>00</u></b></td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#SNDJRNE.ENTDTA"><b>ENTDTA</b></a></td>
<td valign="top">Entry data</td>
<td valign="top"><i>Character value</i>, <b><u>*BLANK</u></b></td>
<td valign="top">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top" rowspan="5"><a href="#SNDJRNE.FILE"><b>FILE</b></a></td>
<td valign="top">Journaled physical file</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="5">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Physical file</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Physical file</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top">Element 2: Member</td>
<td valign="top">
<i>Name</i>, <b><u>*FIRST</u></b>, *NONE</td>
</tr>
<tr>
<td valign="top" rowspan="6"><a href="#SNDJRNE.OBJ"><b>OBJ</b></a></td>
<td valign="top">Object</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="6">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Object</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Object</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top">Element 2: Object type</td>
<td valign="top">
<b><u>*FILE</u></b>, *DTAARA, *DTAQ</td>
</tr>
<tr>
<td valign="top">Element 3: Member</td>
<td valign="top">
<i>Name</i>, <b><u>*FIRST</u></b>, *NONE</td>
</tr>
<tr>
<td valign="top"><a href="#SNDJRNE.OBJPATH"><b>OBJPATH</b></a></td>
<td valign="top">Object</td>
<td valign="top"><i>Path name</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDJRNE.OBJFID"><b>OBJFID</b></a></td>
<td valign="top">File identifier</td>
<td valign="top"><i>Hexadecimal value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDJRNE.FORCE"><b>FORCE</b></a></td>
<td valign="top">Force journal entry</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDJRNE.OVRSTATE"><b>OVRSTATE</b></a></td>
<td valign="top">Override journal state</td>
<td valign="top"><b><u>*NONE</u></b>, *STANDBY</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="SNDJRNE.JRN"></a>
<h3>Journal (JRN)</h3>
<p>Specifies the journal to contain the new journal entry.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 1: Journal</b>
</p>
<dl>
<dt><b><i>journal-name</i></b></dt>
<dd>Specify the name of the journal to contain the new journal entry.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.TYPE"></a>
<h3>Journal entry type (TYPE)</h3>
<p>Specifies the journal entry type of this journal entry.
</p>
<dl>
<dt><b><u>00</u></b></dt>
<dd>The journal entry type is a '00' (hex F0F0).
</dd>
<dt><b><i>entry-type</i></b></dt>
<dd>Specify a 2-character value or hex value used for the journal entry type. This value must be greater than or equal to hex C000.
<p>If a hexadecimal value is specified that does not represent characters, that value is not shown on the DSPJRN display or on the printout.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.ENTDTA"></a>
<h3>Entry data (ENTDTA)</h3>
<p>Specifies the user-specified data that is placed in the variable portion of the journal entry.
</p>
<dl>
<dt><b><u>*BLANK</u></b></dt>
<dd>No user-specified data is placed in the journal entry.
</dd>
<dt><b><i>'entry specific-data'</i></b></dt>
<dd>Specify up to 3000 characters, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.FILE"></a>
<h3>Journaled physical file (FILE)</h3>
<p>Specifies the database physical file and member with which this entry is associated.
</p>
<p>If this parameter is specified, the parameters OBJ, OBJPATH or OBJFID cannot also be specified.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no associated physical file for this entry.
</dd>
</dl>
<p><b>Element 1: Physical file</b>
</p>
<p><b>Qualifier 1: Physical file</b>
</p>
<dl>
<dt><b><i>file-name</i></b></dt>
<dd>Specify the name of the physical file with which this entry is associated.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
<p><b>Element 2: Member</b>
</p>
<dl>
<dt><b><u>*FIRST</u></b></dt>
<dd>The entry is associated with the first member in the file.
</dd>
<dt><b>*NONE</b></dt>
<dd>The entry is associated with the file, not with any member of the file.
</dd>
<dt><b><i>member-name</i></b></dt>
<dd>Specify the name of the physical file member with which this entry is associated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.OBJ"></a>
<h3>Object (OBJ)</h3>
<p>Specifies the object with which this entry is associated.
</p>
<p>If this parameter is specified, the parameters FILE, OBJPATH or OBJFID cannot also be specified.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no associated object for this entry.
</dd>
</dl>
<p><b>Element 1: Object</b>
</p>
<p><b>Qualifier 1: Object</b>
</p>
<dl>
<dt><b><i>object-name</i></b></dt>
<dd>Specify the name of the object with which this entry is associated.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
<p><b>Element 2: Object type</b>
</p>
<dl>
<dt><b><u>*FILE</u></b></dt>
<dd>The entry is associated with a database file or database file member.
</dd>
<dt><b>*DTAARA</b></dt>
<dd>The entry is associated with a data area.
</dd>
<dt><b>*DTAQ</b></dt>
<dd>The entry is associated with a data queue.
</dd>
</dl>
<p><b>Element 3: Member</b>
</p>
<dl>
<dt><b><u>*FIRST</u></b></dt>
<dd>The entry is associated with the first member in the file.
</dd>
<dt><b>*NONE</b></dt>
<dd>The entry is associated with the file, not with any member of the file.
</dd>
<dt><b><i>member-name</i></b></dt>
<dd>Specify the name of the physical file member with which this entry is associated.
<p>
<b>Note: </b>If the specified object type is not *FILE, the member name value is ignored.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.OBJPATH"></a>
<h3>Object (OBJPATH)</h3>
<p>Specifies the path-qualified object name with which this entry is associated. Only objects whose path name identifies an object of type *STMF, *DIR or *SYMLNK that is in the "root" (/), QOpenSys, and user-defined file systems are supported.
</p>
<p>If this parameter is specified, the parameters FILE, OBJ or OBJFID cannot also be specified.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no associated object for this entry.
</dd>
<dt><b><i>path-name</i></b></dt>
<dd>Specify the name of the object with which this entry is associated.
<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>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.OBJFID"></a>
<h3>File identifier (OBJFID)</h3>
<p>Specifies the file-identifier (FID) with which this entry is associated. 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 or *SYMLNK that is in the "root" (/), QOpenSys, and user-defined file systems are supported.
</p>
<p>If this parameter is specified, the parameters FILE, OBJ or OBJPATH cannot also be specified.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no associated object for this entry.
</dd>
<dt><b><i>file-identifier</i></b></dt>
<dd>Specify the FID for the object with which this entry is associated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.FORCE"></a>
<h3>Force journal entry (FORCE)</h3>
<p>Specifies whether the journal receiver is forced to auxiliary storage after the user entry is written to it.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The journal receiver is not forced to auxiliary storage.
</dd>
<dt><b>*YES</b></dt>
<dd>The journal receiver is forced to auxiliary storage.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDJRNE.OVRSTATE"></a>
<h3>Override journal state (OVRSTATE)</h3>
<p>Specifies whether the journal entry will be deposited, overriding the current state of the journal.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>None of the journal state values are overridden. That is,
<ul>
<li>The journal entry is deposited if the journal state is *ACTIVE.
</li>
<li>The journal entry is not deposited and an error is not sent if the journal state is *STANDBY.
</li>
</ul>
</dd>
<dt><b>*STANDBY</b></dt>
<dd>The journal entry is deposited even if the journal state is *STANDBY.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SNDJRNE.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Forcing Journal Receivers to Auxiliary Storage</b>
</p>
<p>
<pre>
SNDJRNE JRN(JRNLA) TYPE(AB) ENTDTA('PROGRAM COMPLETE')
FILE(MYLIB/ORDERENT MBR1) FORCE(*YES)
</pre>
</p>
<p>If the journal currently has a journal state of *ACTIVE, this command places a journal entry of type AB (hex C1C2) with the journal entry data 'PROGRAM COMPLETE' in the current journal receivers attached to journal JRNLA as found by using the library search list. The entry is associated with member MBR1 of file ORDERENT in library MYLIB. The journal receiver is forced to auxiliary storage after the entry has been placed in it.
</p>
<p><b>Example 2: Sending a Journal Entry</b>
</p>
<p>
<pre>
SNDJRNE JRN(JRNLA) TYPE(x'C1F1') OVRSTATE(*STANDBY)
</pre>
</p>
<p>If the journal currently has a journal state of *STANDBY or *ACTIVE, this command places a journal entry of type 'A1' (hex C1F1) with no journal entry data in the current journal receiver attached to journal JRNLA as found by using the library search list. The entry is not associated with any physical file member.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SNDJRNE.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>CPF7002</b></dt>
<dd>File &amp;1 in library &amp;2 not a physical file.
</dd>
<dt><b>CPF7003</b></dt>
<dd>Entry not journaled to journal &amp;1. Reason code &amp;3.
</dd>
<dt><b>CPF7004</b></dt>
<dd>Maximum number of objects journaled to journal &amp;1.
</dd>
<dt><b>CPF7007</b></dt>
<dd>Cannot allocate member &amp;3 file &amp;1 in &amp;2.
</dd>
<dt><b>CPF7035</b></dt>
<dd>Object &amp;1 in &amp;2 already known to journal.
</dd>
<dt><b>CPF7037</b></dt>
<dd>Object not journaled to journal &amp;3.
</dd>
<dt><b>CPF70EF</b></dt>
<dd>Parameters cannot be used together.
</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>CPF9812</b></dt>
<dd>File &amp;1 in library &amp;2 not found.
</dd>
<dt><b>CPF9815</b></dt>
<dd>Member &amp;5 file &amp;2 in library &amp;3 not found.
</dd>
<dt><b>CPF9820</b></dt>
<dd>Not authorized to use library &amp;1.
</dd>
<dt><b>CPF9822</b></dt>
<dd>Not authorized to file &amp;1 in library &amp;2.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDJRNE.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>