CPF4328: Member not journaled to journal
CPF4328 means a program tried to open a database file under commitment control, but the file's member isn't being journaled. Commitment control needs a journal to undo changes, so the open fails.
Other names for this code
Also written as CPF4328 member not journaled, MSGID CPF4328, member not journaled to journal, not journaled to journal *N, error message CPF4328 appeared during OPEN.
What it means
CPF4328 is an escape message sent at open time. The text names the member and the journal. When the member isn't journaled at all, the journal name shows as *N, for example "Member ORDHDR not journaled to journal *N."
Commitment control lets a program group several database changes and then commit them together or roll them back. To roll back, the system reads the before images of the changed records from a journal. So every file that a program opens under commitment control must be journaled. If it isn't, the open fails with CPF4328, one of the open failures in the CPF4101 to CPF43FF range.
IBM lists CPF4328 with CPF4293, CPF4326, CPF4327 and CPF4329 as the messages for an open that couldn't put the file under commitment control. In ILE COBOL they all return file status 9P. In ILE RPG the open error comes back as file status 01216 or 01217 and the default handler sends RNQ1216.
Common causes
- An RPG program has the COMMIT keyword on the file, commitment control is active in the job, and the file was never journaled. This is common on files created outside an SQL schema, which aren't journaled automatically.
- The file was journaled on one system but not on another, for example after it was re-created or restored into a test library without journaling.
- Journaling was ended on the file with ENDJRNPF, for example during a reload, and never started again.
- Another program in the job started commitment control with STRCMTCTL, so a program that normally runs without it now opens its files under commitment control.
How to find the problem
- Run DSPJOBLOG and press F1 on CPF4328 to see the member and journal. A journal name of *N means the member isn't journaled at all.
- Run
DSPFD FILE(ACCTLIB/on the physical file and look at the journaling information to see whether it is journaled and to which journal.ORDHDR) TYPE(*ATR) - Check whether commitment control is active in the job, and who started it. WRKCMTDFN lists the commitment definitions for active jobs.
- In the program source, look for the COMMIT keyword on the file (RPG) or a COMMITMENT CONTROL clause (COBOL).
How to fix it
- Start journaling on the physical file with
STRJRNPF FILE(ACCTLIB/. If there is no journal yet, create a receiver with CRTJRNRCV and a journal with CRTJRN first. Talk to whoever manages journals and receivers, because receivers use disk space and need a cleanup routine.ORDHDR) JRN(ACCTLIB/ ACCTJRN) - For a logical file, journal the physical files it is built over.
- If the program shouldn't use commitment control, remove the COMMIT keyword or pass it an indicator that is off, or make sure STRCMTCTL isn't run before the program.
- Put journaling back in your build and restore procedures, so a re-created file starts journaling again before programs use it.
What it looks like
Member ORDHDR not journaled to journal *N. Error message CPF4328 appeared during OPEN for file ORDHDR (C S D F).
IBM documentation
IBM Display Message Descriptions (DSPMSGD). Use the documentation for your installed release.
This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.
Read the installed message description:
DSPMSGD MSGID(CPF4328) MSGF(QSYS/QCPFMSG)
Also inspect the full job log and second-level message text, including substitution values.
Related codes
Questions
Why does the journal show as *N?
The member isn't journaled to any journal, so there is no journal name to show. Start journaling with STRJRNPF and the open will work.
Do all files a program uses need journaling?
Only the files it opens under commitment control. Files opened without commitment control can stay unjournaled, though most shops journal important files anyway for recovery.
Is starting journaling on a live file safe?
Starting journaling needs a lock on the file, so it is simplest to run STRJRNPF at a quiet time when programs aren't using it. After that, every change is written to the journal, so plan for receiver space.