OpenTP1 Version 7 Operation

[Contents][Index][Back][Next]

4.3.1 OpenTP1 journals

This subsection describes the structure of an OpenTP1 journal.

Organization of this subsection
(1) Records
(2) Journal blocks

(1) Records

An OpenTP1 journal contains OLTP records and journal records.

OLTP record
An OLTP record is an I/O unit by which records are read from and written to a journal. Each OLTP record is 4,096 bytes long. The number of records specified in the -n option of the jnlinit command, and the number of records displayed when the -d option is specified for the jnlls command, both refer to the number of OLTP records.

Journal record
A journal record is a unit of data that makes up a journal block. A logical unit of information generated by the system, such as a unit of historical or statistical information, constitutes a single journal record. The maximum length of a journal record is the value specified in the jnl_max_datasize operand in the system journal service definition. The records displayed when you execute the jnledit command are journal records.

(2) Journal blocks

Journal blocks are the units by which the data in the journal buffer is output to a journal file. The space allocated for a single journal buffer is equivalent to the jnl_max_datasize operand in the system journal service definition. A single journal block comprises between 1 and n journal records. If the system cannot write any more journal records to the journal buffer when you attempt to acquire journal records, or if a request for acquisition of a synchronization point journal record occurs, the journal records acquired up to that point are output to the journal file as one journal block. When a journal block is written to the journal file, the block number shown when you execute the jnlls command is incremented by one.

An OpenTP1 journal outputs a single journal block using between 1 and n OLTP records. If a value of 32,000 is specified in the jnl_max_datasize operand in the system journal service definition, the OpenTP1 journal uses between 1 and 8 OLTP records. The equation used to arrive at the maximum of 8 is 32,000/4,096 (which is then rounded up to a whole number). When the journal buffer cannot acquire any more journal records, the OpenTP1 journal uses eight OLTP records to output the journal block. However, when a synchronization point journal record is encountered, the OpenTP1 journal acquires the journal records already in the journal buffer, as a journal block. Here the journal block may be less than 4,096 bytes long, in which case only one OLTP record will be used.

The following figure shows the relationship between records and journal blocks.

Figure 4-3 Relationship between records and journal blocks

[Figure]

In Figure 4-3, one journal block comprises six journal records, and is stored in the journal file using two OLTP records.

You can determine how much space an OpenTP1 journal file is using. Multiply the number of records output by the jnlls -d command by the OLTP record length, in this case 4,096 bytes. For example, when the jnlls command produces the execution results shown in the figure below, the capacity used by the journal file jnlgrp02 will be (13)16 x 4,096 bytes = 77,824 bytes.

Figure 4-4 Execution results of jnlls -j sys -d

[Figure]