Methods to save journal receivers
Following are three methods to save journal receivers. The first method saves journal receivers individually. The two other methods save the journal receiver automatically.
Saving journal receivers individually
Use the Work with Journal Attributes (WRKJRNA) command to display the receiver directory for each journal. The receiver directory tells which journal receivers have not yet been saved. Then use the Save Object (SAVOBJ) command to save them.
The advantage to using this technique is that each journal receiver is saved only once. You will not have problems with duplicate names and partial receivers if you need to restore. The disadvantage to this technique is that it requires manual effort to determine the names of the journal receivers to be saved.
Saving journal receivers by name - Automated method 1
You can use a combination of system journal-receiver management and a control language (CL) program to automate most journal management tasks. Do the following:
- Specify a threshold size for the journal receiver.
- Specify MNGRCV(*SYSTEM), DLTRCV(*NO), and a message queue for the journal.
- Use a CL program to monitor the journal message queue for the message (CPF7020) that indicates that the system has successfully detached the journal receiver.
- Your CL program can then save the receiver that was detached and optionally delete it.
Saving journal receivers by name - Automated method 2
An alternate method of automatically saving journal receivers is to use a high level language program that uses the Retrieve Journal Information (QjoRetrieveJournalInformation) API. The program can use this API to determine the journal receiver directory and which receivers are not saved. The program can then save the journal receivers that are not marked as saved. You can set up this program to run on a regular basis or as part of normal processing.
Parent topic:
Saving journals and journal receiversRelated information
CL Programming