Submitted by Kim Egekjaer on Fri, 08/31/2012 - 00:00
Forums

When I introduce InterForm400 to a new customer I explain the journal of InterForm400 as a safety net, which can be used for rolling back a change, that you might regret. The journaling must be enabled before you can import or save any changes in the graphical designer.
 
In short the journal record any change of the journaled files, so if you make many changes the size of the journal receiver will increase. So journaling helps you as a user, but for some administrators the journals in general is a potential storage hog which could potentially take up quite a lot of the disk space.
 
Normally the size of the InterForm400 journal receiver is quite small as the journaled changes are normally fairly small and few. You also start with a new empty journal receiver when upgrading InterForm400, but if you want to be sure, that the journal is not taking up more disc space than necessary, then you can reduce it like described below.
 
The prerequisites/assumptions for the examples below:

  • You are using the default journal, APF3812/APFJRN.
  • You save your backup onto the device, TAP01.
  • You are not using the same journal for anything else like journaling of other objects/applications or mirroring.
  • You will need to restore the saved journal receiver(s) before you can roll back changes that happened before the cleanup.
  • I assume, that journaling is activated.

a) Manual cleanup: First you need to detach the active journal. This can e.g. be done via the journal menu: Select option 12. Service functions, 9. Journal menu, 2. End journaling files in InterForm library APF3812. Press F10 to confirm. Now you should save and delete the detached journal with option: 3. Delete journal and receivers in InterForm library APF3812. Now you can restart the journaling with (using a new, empty journal receiver) with option 1. Start journaling files in InterForm library APF3812. The only thing missing is backup and delete of the save files in the APF3812 library called SAVJRN*: Backup can be done with the command: SAVOBJ OBJ(SAVJRN*) LIB(APF3812) DEV(TAP01) OBJTYPE(*FILE) and then you can delete the save files with the command: DLTF FILE(APF3812/SAVJRN*).
 

b) Automatic cleanup: Instead of the manual cleanup you can also chose to change the journal receiver prior to a backup and then delete the detached receiver(s) immediately after the backup. This can e.g. be done with a CL program in this way:

 

PGM                                                                                                                                       
/* CHANGE THE JOURNAL RECEIVER */                                     
             CHGJRN     JRN(APF3812/APFJRN) JRNRCV(*GEN)             
             MONMSG     MSGID(CPF9801) EXEC(GOTO CMDLBL(END)) /* No +
                          objects with that name*/                   
/* BACKUP THE DETACHED JOURNAL RECEIVERS */                          
             SAVOBJ     OBJ(APFJRN*) LIB(APF3812) DEV(TAP01) +       
                          OBJTYPE(*JRNRCV) 
/* DELETE ANY DETACHED JOURNAL RECEIVERS */                           
             DLTJRNRCV  JRNRCV(APF3812/APFJRN*)                      
             MONMSG     MSGID(CPF2125) /* No objects deleted*/       
             MONMSG     MSGID(CPF2117) /* Could not delete attached +
                          journal receiver*/                         
 END:        ENDPGM