Professional Documents
Culture Documents
Concepts of File Journal Management On AS-400
Concepts of File Journal Management On AS-400
Version 1.0
Dated: March 22, 2006
________________________________________________________________________
Page 1
Patni Internal
_______________________________________________________________________
_
Journal management provides a means by which you can record the activity of objects on your system.
When you use journal management, you create an object called a journal. The journal records the
activities of the objects you specify in the form of journal entries. The journal writes the journal
entries in another object called a journal receiver.
Journal management provides you with the following:
1 Decreased recovery time after an abnormal end
2 Powerful recovery functions
3 Powerful audit functions
4 The ability to replicate journal entries on a remote system
Journals
When a change is made to a file and you are using journals, the system records the change in
a journal receiver and writes the receiver to auxiliary storage before it is recorded in the
file. Therefore, the journal receiver always has the latest database information.
Journal entries record activity for a specific record or for the file as a whole. Each entry
includes bytes of control information that identify the source of the activity (such as user,
job, program, time, and date). For changes that affect a single record, record images are
included after the control information. The record image before the change can also be
included. You can control whether to create a journal both before and after record images or
just after record images by specifying the IMAGES parameter on the Start Journal Physical File
(STRJRNPF) command.
All journal database files are automatically synchronized with the journal when the system is
started (IPL time). If the system session ended abnesormally, some database changes may be
in the journal, but some of these changes may not be reflected in the database files. If that is
the case, the system automatically updates the database files from the journal.
Journals make saving database files an easier and faster task. For example, instead of saving
an entire file every day, simply save the journal receiver that contains the changes to that
file. You might still save the entire file on a weekly basis. This method can reduce the amount
of time it takes to perform your daily save operations.
Journals Entries:-
When changes is made in Journalized file, the entries for each change are written in Journal
known as Journal Entries. Journal entries contain information such as:
The job name, program name, and user that caused the journal entry to be deposited
into the local journal.
The date and time the journal entry was deposited into the local journal.
Journal code.
Entry type.
Information that is unique to each journal entry type, called entry specific data.
For example, the entry specific data associated with the put of a record to a physical file
member (journal code R, entry type PT) contains an image of the actual record that was put.
The rest of the journal entry information helps determine at what time, by what user the entry
was sent, and other details. If a user sends information to the journal using the SNDJRNE
command or QJOSJRNE API (journal code U, entry type is defined at send time by the user),
________________________________________________________________________
Page 2
Patni Internal
_______________________________________________________________________
_
the entry specific data contains what was specified at that time. For a complete description of
the information contained in journal entries that the system sends and all the possible journal
codes and entry types.
The journal Entries consists of following information
The journal code.:-This code is set by the system to indicate the kind of journal entry that was
recorded. The journal codes and brief descriptions for the journal codes follow:
A - System accounting entry
C - Commitment control operation
D - Database file operation
F - Database file member operation
J - Journal or journal receiver operation
I - Access path operation
L - License management
M - Network management data
O - Object oriented entry
P - Performance tuning entry
R - Record level operation
S - Distributed mail service for SNA distribution services (SNADS),
The journal entry type.:- This code is set by the system to indicate the specific type of
journal entry. There are many different types of journal entries that can occur for each
journal code.
For journal code A the possible journal entry types are:
DP - Direct print information
JB - Job accounting segment
SP - Spooled print information
For journal code C the possible journal entry types are:
BC - Commitment control environment begun
CM - Set of record changes committed
EC - Commitment control environment ended
LW - Logical unit of work ended
RB - Set of record changes rolled back
SC - Commit cycle started
For journal code D the possible journal entry types are:
DF - Delete file
EF - End journaling for file
FM - File moved
FN - File renamed
JF - Start journaling for file
For journal code F the possible journal entry types are:
AY - Journal changes applied to physical file member
CE - Change end of data for physical file
CH - Change file
CL - Physical file member closed
CR - Physical file member cleared
DE - Physical file member deleted record count
EJ - Journaling for physical file member ended
EP - Journaling for access path ended
FD - Physical file member forced to auxiliary storage
FI - Internal journal entry format information
________________________________________________________________________
Page 3
Patni Internal
_______________________________________________________________________
_
IU - Physical file member in use at abnormal termination
IZ - Physical file member initialized
JM - Journaling for physical file member started
JP - Journaling for access path started
MD - Member removed from physical file
MF - Storage for physical file member freed
MM - Physical file containing member moved
________________________________________________________________________
Page 4
Patni Internal
_______________________________________________________________________
_
RD - Journal receiver deleted
RF - Storage for journal receiver freed
RR - Journal receiver restored
RS - Journal receiver saved
XP - Internal entry
For journal code L the possible journal entry types are:
LK - License key not valid
LL - Usage limit changed
LU - Usage limit exceeded
For journal code M the possible journal entry types are:
SN - Simple Network Management Protocol (SNMP) information
TF - IP filter rules actions
TN - IP NAT rules actions
TS - VPN information
For journal code O the possible journal entry types are:
AI - Update, after image
BI - Update, before image
XA - Allocate object
XB - Bundled entries
XD - Deallocate object
XI - Index operation
XS - Synchronization
XT - Transaction state change
Journalized file Name
Journal Receiver: -
A journal receiver is the object that contains journal entries, and can be associated with
either a local or remote journal. For a journal receiver attached to a local journal, journal
entries are directly deposited into the journal receiver. For a journal receiver attached to a
remote journal, journal entries are replicated into the journal receiver from the source journal
receiver associated with the upstream source journal.
The process to attach journal to file:-
If you want attach journal to a file you can use following commands: -
First create the journal and associated journal receiver that you want to attach to file in your
working library using
CRTJRNRCV(Create Journal Receiver):-
While Creating Journal receiver specifies storage space threshold value (in KB).This will
help to send the message to Message Queue if no of journal entries in journal are exceed than
this limit.
CRTJRN (Create Journal): -
The journal that you are going to create attach to Journal receiver using earlier
command.
The following parameters are important while creating Journal
Journal message queue (MSGQ): - You can specify the message queue, which will receive
message if journaling an entry is abandoned
Manage receivers (MNGRCV); - You can specify whether user will do any action or system will
do any action when attached journal receiver reaches its threshold. If you specify the system
as option then system will remove the current receiver and attach new receiver to Journal.
Other than this during IPL (Initial Program Load) the system will attach new journal receiver
and remove old one.
________________________________________________________________________
Page 5
Patni Internal
_______________________________________________________________________
_
Delete receivers (DLTRCV): - Specifies whether the system deletes journal receiver when they
are no longer needed or leaves them on the system for the user to delete after they have been
detached by system change-journal management or by a user-issued CHGJRN command.
Receiver size options (RCVSIZOPT): - Specifies the options that affect the size of the receivers
attached to the journal.
Before issuing this command make sure that the file is not being locked by system (process).
Note:- You can start and end journaling a file at anytime during process.
________________________________________________________________________
Page 7
Patni Internal