| Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
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.
If the journal currently has a state of *STANDBY, then the journal entry will not be deposited unless OVRSTATE(*STANDBY) is specified.
The journal code for the entry is U, which indicates a user-specified journal entry.
Note: 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 APIs topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Restrictions:
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.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| JRN | Journal | Qualified object name | Required, Positional 1 |
| Qualifier 1: Journal | Name | ||
| Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
| TYPE | Journal entry type | Character value, 00 | Optional, Positional 2 |
| ENTDTA | Entry data | Character value, *BLANK | Optional, Positional 3 |
| FILE | Journaled physical file | Single values: *NONE Other values: Element list |
Optional |
| Element 1: Physical file | Qualified object name | ||
| Qualifier 1: Physical file | Name | ||
| Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
| Element 2: Member | Name, *FIRST, *NONE | ||
| OBJ | Object | Single values: *NONE Other values: Element list |
Optional |
| Element 1: Object | Qualified object name | ||
| Qualifier 1: Object | Name | ||
| Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
| Element 2: Object type | *FILE, *DTAARA, *DTAQ, *LIB | ||
| Element 3: Member | Name, *FIRST, *NONE | ||
| OBJPATH | Object | Path name, *NONE | Optional |
| OBJFID | File identifier | Hexadecimal value, *NONE | Optional |
| FORCE | Force journal entry | *NO, *YES | Optional |
| OVRSTATE | Override journal state | *NONE, *STANDBY | Optional |
| OVRRMTFTR | Override remote filter | *NONE, *FTROBJ | Optional |
| Top |
Specifies the journal to contain the new journal entry.
This is a required parameter.
Qualifier 1: Journal
Qualifier 2: Library
| Top |
Specifies the journal entry type of this journal entry.
If a hexadecimal value is specified that does not represent characters, that value is not shown on the DSPJRN display or on the printout.
| Top |
Specifies the user-specified data that is placed in the variable portion of the journal entry.
| Top |
Specifies the database file and physical file member with which this entry is associated.
If this parameter is specified, the parameters OBJ, OBJPATH or OBJFID cannot also be specified.
Single values
Element 1: Physical file
Qualifier 1: Physical file
Note: If the specified file is a logical file, the member name must be *NONE.
Qualifier 2: Library
Element 2: Member
| Top |
Specifies the object with which this entry is associated.
If this parameter is specified, the parameters FILE, OBJPATH or OBJFID cannot also be specified.
Single values
Element 1: Object
Qualifier 1: Object
Note: If the specified object type is not *FILE, the member name value is ignored.
Note: If the specified object is a logical file, the member name must be *NONE.
Qualifier 2: Library
Element 2: Object type
Element 3: Member
| Top |
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.
Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.
If this parameter is specified, the parameters FILE, OBJ or OBJFID cannot also be specified.
| Top |
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.
If this parameter is specified, the parameters FILE, OBJ or OBJPATH cannot also be specified.
| Top |
Specifies whether the journal receiver is forced to auxiliary storage after the user entry is written to it.
| Top |
Specifies whether the journal entry will be deposited, overriding the current state of the journal.
| Top |
Specifies whether the journal entry will be sent to remote journals, overriding filtering criteria.
| Top |
Example 1: Forcing Journal Receivers to Auxiliary Storage
SNDJRNE JRN(JRNLA) TYPE(AB) ENTDTA('PROGRAM COMPLETE')
FILE(MYLIB/ORDERENT MBR1) FORCE(*YES)
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.
Example 2: Sending a Journal Entry
SNDJRNE JRN(JRNLA) TYPE(x'C1F1') OVRSTATE(*STANDBY)
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.
| Top |
*ESCAPE Messages
| Top |