Send Journal Entry (SNDJRNE)

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.

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.

Restrictions:

Top


 

Parameters

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
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

Top

 

Journal (JRN)

Specifies the journal to contain the new journal entry.

This is a required parameter.

Qualifier 1: Journal

journal-name

Specify the name of the journal to contain the new journal entry.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.

library-name

Specify the name of the library to be searched.

Top

 

Journal entry type (TYPE)

Specifies the journal entry type of this journal entry.

00

The journal entry type is a '00' (hex F0F0).

entry-type

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.

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

 

Entry data (ENTDTA)

Specifies the user-specified data that is placed in the variable portion of the journal entry.

*BLANK

No user-specified data is placed in the journal entry.

'entry specific-data'

Specify up to 3000 characters, enclosed in apostrophes.

Top

 

Journaled physical file (FILE)

Specifies the database physical file and member with which this entry is associated.

If this parameter is specified, the parameters OBJ, OBJPATH or OBJFID cannot also be specified.

Single values

*NONE

There is no associated physical file for this entry.

Element 1: Physical file

Qualifier 1: Physical file

file-name

Specify the name of the physical file with which this entry is associated.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.

library-name

Specify the name of the library to be searched.

Element 2: Member

*FIRST

The entry is associated with the first member in the file.

*NONE

The entry is associated with the file, not with any member of the file.

member-name

Specify the name of the physical file member with which this entry is associated.

Top

 

Object (OBJ)

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

*NONE

There is no associated object for this entry.

Element 1: Object

Qualifier 1: Object

object-name

Specify the name of the object with which this entry is associated.

Qualifier 2: Library

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.

library-name

Specify the name of the library to be searched.

Element 2: Object type

*FILE

The entry is associated with a database file or database file member.

*DTAARA

The entry is associated with a data area.

*DTAQ

The entry is associated with a data queue.

Element 3: Member

*FIRST

The entry is associated with the first member in the file.

*NONE

The entry is associated with the file, not with any member of the file.

member-name

Specify the name of the physical file member with which this entry is associated.

If the specified object type is not *FILE, the member name value is ignored.

Top

 

Object (OBJPATH)

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.

If this parameter is specified, the parameters FILE, OBJ or OBJFID cannot also be specified.

*NONE

There is no associated object for this entry.

path-name

Specify the name of the object with which this entry is associated.

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.

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.

Top

 

File identifier (OBJFID)

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.

*NONE

There is no associated object for this entry.

file-identifier

Specify the FID for the object with which this entry is associated.

Top

 

Force journal entry (FORCE)

Specifies whether the journal receiver is forced to auxiliary storage after the user entry is written to it.

*NO

The journal receiver is not forced to auxiliary storage.

*YES

The journal receiver is forced to auxiliary storage.

Top

 

Override journal state (OVRSTATE)

Specifies whether the journal entry will be deposited, overriding the current state of the journal.

*NONE

None of the journal state values are overridden. That is,

  • The journal entry is deposited if the journal state is *ACTIVE.

  • The journal entry is not deposited and an error is not sent if the journal state is *STANDBY.

*STANDBY

The journal entry is deposited even if the journal state is *STANDBY.

Top


 

Examples

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


 

Error messages

*ESCAPE Messages

CPFA0D4

File system error occurred. Error number &1.

CPF7002

File &1 in library &2 not a physical file.

CPF7003

Entry not journaled to journal &1. Reason code &3.

CPF7004

Maximum number of objects journaled to journal &1.

CPF7007

Cannot allocate member &3 file &1 in &2.

CPF7035

Object &1 in &2 already known to journal.

CPF7037

Object not journaled to journal &3.

CPF70EF

Parameters cannot be used together.

CPF9801

Object &2 in library &3 not found.

CPF9802

Not authorized to object &2 in &3.

CPF9803

Cannot allocate object &2 in library &3.

CPF9810

Library &1 not found.

CPF9812

File &1 in library &2 not found.

CPF9815

Member &5 file &2 in library &3 not found.

CPF9820

Not authorized to use library &1.

CPF9822

Not authorized to file &1 in library &2.

Top