RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

QDFTJRN Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

Using a data area named QDFTJRN, you can automatically start journaling when a non-integrated file system object (data area, data queue, or file) is created, moved, or restored into the library, thus, ensuring the very first change to the object will be recorded in the journal and that no lock on the user's part prevents journaling from starting in the library. The QDFTJRN data area must exist in the library where the object is being added.


NOTE : The QDFTJRN data area must be created by the user.


This table shows formats of the QDFTJRN data area.


Offset Field Format Description
1 Library name Char (10) Name of the library that contains the journal.
11 Journal name Char (10) Name of the journal to use to automatically start journaling.
21 Repeat the set of Object type and Option as needed:
  Object type Char (10)

Object type value:

  • *FILE = database files or SQL tables
  • *DTAARA = data areas
  • *DTAQ = data queues
  • *ALL = all journal eligible objects which are not in an integrated file system
  • *NONE = no objects
  Option Char (10)

Option:

  • *CREATE = Start journaling when an object is created into the library
  • *MOVE = Start journaling when an object is moved into the library
  • *RESTORE = Start journaling when an object is restored into the library
  • *ALLOPR = Start journaling in all cases possible
  • *RSTOVRJRN = Override the saved object's journal and start journaling to the journal name in this QDFTJRN data area when the object is restored into the library

The QDFTJRN data area provides more options for journaling during the restore operation. When using the *RESTORE keyword in the QDFTJRN data area, even if an object was not journaled at save time, the operating system automatically records the restore operation to the journal specified in the QDFTJRN data area. However, if the object was journaled at save time and that journal still exists on the system, the journal specified in the QDFTJRN data area is ignored. In this case, the operating system still records the restore operation to the journal used at save time.


You can use the *RSTOVRJRN keyword to override the journal used at save time. After you specify the *RSTOVRJRN keyword in the QDFTJRN data area, the operating system always records the restore operation to the journal that is specified in the QDFTJRN data area. In this case, any journal used at save time is ignored. PTFs SI24505, SI24794, SI24812, and SI24864 are required to activate this *RSTOVRJRN keyword function.


If the object being restored still exists on the system, the *RSTOVRJRN keyword is ignored during the restore operation. When the *RSTOVRJRN keyword is in effect, if the journal named in the QDFTJRN data area does not exist on the system, the restored object will not be journaled.


If you changed the journal of your object using the *RSTOVRJRN keyword, save your object as soon as possible to enable future recovery operations with the Apply Journaled Changes (APYJRNCHG), Apply Journaled Changes Extend (APYJRNCHGX), and Remove Journaled Changes (RMVJRNCHG) commands. The save operation records the journal receiver and the new journal as the journal receiver and journal to use for recovering your object from the point of its last save. The save operation also updates the last saved date of your object, if UPDHST(*YES) is specified on the save command.


To use the *RSTOVRJRN keyword to override the journal used at save time, position the *RSTOVRJRN keyword in the QDFTJRN data area before the references to the *ALLOPR or *RESTORE operation option. Here is an example.


For example, the files restored into library OVERRIDE are currently journaled to journal SAVEJRN in library SAVELIB. But you want the files to be journaled to journal OVERJRN in library JRNLIB, while you still want the restored data areas or data queues to be journaled to the save time journal. And you also want any new objects created into the library OVERRIDE to be journaled to journal OVERJRN in library JRNLIB. To achieve this, use the following commands to create the QDFTJRN data area.


CRTDTAARA DTAARA(OVERRIDE/QDFTJRN) TYPE(*CHAR) LEN(80)                       
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (1 10) VALUE(JRNLIB)                      
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (11 10) VALUE(OVERJRN)                    
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (21 10) VALUE(*FILE)                      
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (31 10) VALUE(*RSTOVRJRN)                 
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (41 10) VALUE(*ALL)                       
CHGDTAARA DTAARA(OVERRIDE/QDFTJRN) (51 10) VALUE(*ALLOPR) 

Extracted from IBM


<Previous   Next>