For AS400 systems that have quite high activity, the use of Journal Cache is needed to speed up the process of writing journals to the journal receiver. By using a journal cache, entries not directly written to disk but to memory first. If several journal entries have been recorded in memory, then they will be transferred to disk.Continue reading AS400 Use of Journal Cache
Journal Receivers that function as a place for Journal Entries written by the Journal have size and restrictions. To enter the Receiver Directory, through Work with Journal Attribute, press F15 = Work with Receiver Directory.
Based on the info above, here are some things that can be concluded:
- Total size of receivers, total size of all journal receivers that are formed.
- Receiver column, the Journal Receiver object that has been formed by the Journal
- Status. ONLINE means that the receiver is not already held by the Journal and has not been saved. ATTACHED signifies the Journal Receiver currently held by the Journal. SAVED receiver is no longer held by the Journal and has been saved.
- Save Date. The date the receiver was saved.
Display Receiver Attribute
Type option 8 (Display attributes) then press Enter.
Here are the details of one for the Journal Receiver. Through this display we can find out when the receiver is held and released by journaling, receiver size, first sequence number and last sequence number. When we check receiver next after MYRCV, MYRCV0001, first sequence number will continue from last sequence at MYRCV.
Omit Journal Entry is one way to reduce the storage capacity of journal receivers. Omit journal entry has only two parameters:
- *NONE, no journal entries have been ignored. All activity of a file or other data object is recorded in a journal. If the Audit wants to find out who is accessing a file, this parameter is needed.
- *OPNCLO, open-close entries are ignored when recording to journal receivers. Receiver journal size becomes smaller.
Omit Journal Entry *NONE
For example, the SOOLDAT/TESTFILE file uses Omit Journal Entries *NONE, so if we run RUNQRY * N SOOLDAT / TESTFILE it will record the open and close file activity.
Entries with code types F-OP (file open) and F-CL (file close) are recorded by journals.
Omit Journal Entry *OPNCLO
For example, the SOOLDAT/TESTFILE file uses Omit Journal Entries *OPNCLO, so if we run RUNQRY * N SOOLDAT/TESTFILE it will not record the open and close file activity.
Open and close file activities are not recorded by journals.
Change Omit Journal Entry:
From the command line, type CHGJRNOBJ then press F4 = Prompt. Press F9 = All Parameters to show all parameters.
Press page down until you find the Attribute (ATR) parameter. Type the Attribute parameter: *OMTJRNE and in the Omit Journal Entry parameter: *NONE or *OPNCLOSYN (as needed).
Record image is a journal way of recording to the journal receiver the data changes of a file. There are two types of image records:
- *AFTER, journaling only records data after changing a file’s record.
- *BOTH, journaling records data before and after changing a file’s record.
When to use * AFTER or * BOTH images?
Image * BOTH can be used for audit purposes (recording data before and after being changed). Because there is a recording of two data contents, the formed journal entries will be larger and consume disk capacity twice the image * AFTER.
Image * AFTER makes writing fewer journal entries to journal receivers. This image makes the audit process more difficult because it only records after the data has been changed.
Example file with journaling image * AFTER and * BOTH when updating records via STRSQL.
Record Image *BOTH:
SOOLDAT/TESTFILE file with journal images * BOTH. Data changes were made with STRSQL:
update SOOLDAT/TESTFILE set address=’Jakarta’ where name=’Bob’
The journal records two journal entries: R-UB (update before) and R-UP (update after).
Record Image *AFTER:
SOOLDAT/TESTFILE file with journal images * AFTER. Data changes were made with STRSQL:
update SOLDAT/TESTFILEset address=’Bali’ where name=’Bob’
Journal records one R-UP journal (update after) only.
Change Journal Record Image:
Through the command line, type CHGJRNOBJ then press F4 = Prompt. Press F9 = All Parameters to show all parameters.
Press page down until you find the Attribute (ATR) parameter. Enter the Attribute parameter: * IMAGES and Images parameter: *AFTER or *BOTH (as needed).
Note: For systems that have a fairly high database activity, images *AFTER are highly recommended. Because it will reduce disk I / O compared to using *BOTH.
The Work with Journal Attribute or WRKJRNA command displays all the attributes of a journal. With this command we can display the Journal Receiver that is being Attached, the journaled files and others. Through the command line, type WRKJRNA then F4 = Prompt, enter the name of the journal and library, then press Enter.
Work with Journal Attributes display:
If we see from the above display, there is some information obtained (I will take some for your attention):
- Journal Receiver which is currently being used is SOOLGPL / MYRCV
- Journaled objects indicate the number of objects that are journalized.
- Manage receiver, if the status is * SYSTEM, it means the system will automatically create a new receiver if the attached receiver is full.
- Delete receiver * NO, means the receivers that has been dettached is not automatically deleted.
- Journal cache * NO, meaning no caching of the journal receiver.
- Journal state * ACTIVE, journal is active.
Type command DSPJRN then press F4 = Prompt. Enter the name of the journal and library.
Display System Journal QAUDJRN:
Display User Journal MYJRN:
From the System and User journals above, the output of the display journal is the activity of recording each journal. Sequences are Journal Entries. Code and Type are activities carried out, such as the example F-JM in user journals, this entry code means the operation of File (F) with the specific activity was Start Member (JM). Next see the details, give option 5 = Display entire entry in the entry code that will be seen then press Enter:
F10=Display only entry details
In detail entry can be seen, object, activity, time and Journal Receiver where this data entry is recorded. The method above is a way to display journals in the position of the Journal Receiver currently in use/attached.