Progress/400
Product Guide


Journaling

Journaling, the logging of database I/O and changes into a journal receiver to provide crash recovery, is an AS/400 concept. Before you start journaling, you create a journal receiver (*JRNRCV), then a journal (*JRN). You then start journaling explicitly with the OS/400 STRJRNPF CL command for each physical database file that you want to recover. Once you start journaling for a physical file, the system writes journal entries until you explicitly end journaling with the OS/400 ENDJRNPF CL command.

Table 8–2 lists CL commands that are useful for journaling.

Table 8–2: CL Commands for Journaling 
Command
Description
CRTJRNRCV
Creates a journal receiver
CRTJRN
Creates a journal
DLTJRN
Deletes a journal
DLTJRNRCV
Deletes a journal receiver
DSPJRN
Displays a journal
ENDJRNPF
Stops journaling a physical file
STRJRNPF
Starts journaling a physical file
WRKJRNA
Works with journal attributes

The following sections explain how to implement AS/400 journaling. For a basic description of AS/400 journaling, see your OS/400 documentation.

Creating a Journal Receiver

Follow these steps to create a journal receiver and start journaling on the AS/400:

  1. Create the journal receiver object. This is the CRTJRNRCV syntax:
  2. SYNTAX
    CRTJRNRCV JRNRCV(library/journal-receiver-name) 
    

  3. Create the journal object. This is the CRTJRN syntax:
  4. SYNTAX
    CRTJRN JRN(library/journal-name) JRNRCV(library/journal-receiver-name) 
    

  5. Now that the journal and journal receiver objects exist, you can start journaling each physical file in your database. This is the STRJRNPF syntax:
  6. SYNTAX
    STRJRNPF FILE(library/physical-file) JRN(library/journal-name) 
    

    Repeat this command for each physical file in your database.

Maintaining a Journal Receiver

Once journaling begins, it continues until you explicitly end it. This is an important consideration because journals use system resources.

This is the syntax for the CL command that stops journaling physical files:

SYNTAX
ENDJRNPF FILE(library/physical-file) JRN(library/journal-name) 

You might want to set up a regular backup schedule for your journals. As journal receivers fill up, you might want to back them up to tape or other media, then delete them from the system. See the AS/400 Backup and Recovery Guide for more information about creating a system maintenance and backup schedule for journal receivers.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095