CPF7091 - Entry not journaled ...

By kimot, 29 September, 2023

If this message surprises you :

Message . . . . :   Entry not journaled to journal #JOURNAL. Reason code 4.     
Cause . . . . . :   The entry was not journaled into receiver #RECEIVER in   
  library LIBRARY for journal #JOURNAL in library LIBRARY because of      
  reason code 4. The object associated with this entry is *N in library *N of 
  type *N member *N, or has file ID X'00000000000000000000000000000000' and   
  path *N. If *N or hex zero appears, information is not available or does not
  apply.                                                                      
    Reason code definitions:                                                  
     1 -- Space for entry cannot be allocated on journal receiver.            
     2 -- Journal is damaged.                                                 
     3 -- Attached receiver is damaged.                                       
     4 -- Journal sequence number is at the maximum value.                    
      5 -- An internal journal failure occurred.                            
      7 -- Attached receiver is off line.                                   
      8 -- Journal is off line.                                             
      9 -- A new journal receiver must be attached to the journal.          
     10 -- Journal state is *INACTIVE.                                      
     11 -- Journal is a remote journal.                                     
     12 -- Entry exceeds the maximum journal entry size.                    
     13 -- Unable to allocate large or very large space.                    
     14 -- Journal state is *STANDBY.                                       
     15 -- Internal error.                                                  
 Recovery  . . . :                                                          
     If receiver #RECEIVER in library LIBRARY is no longer attached to  
   journal #JOURNAL, recovery using CHGJRN to attach a new receiver may not be
  required.                                                                   
    Recovery for each reason code is:                                         
    1 -- If the owning user or group profile of the journal receiver has      
  reached its storage limit, increase the maximum storage (MAXSTG parameter on
  CHGUSRPRF). If the journal receiver has reached its maximum size, change the
  journal (CHGJRN) to attach a new receiver.                                  
    2-4 -- CHGJRN to attach a new receiver and if necessary reset the sequence
  number. If problem persists, delete the journal and either create or restore
  the journal. To delete a journal, end journaling all objects (ENDJRNAP,     
  ENDJRNPF, ENDJRN, ENDJRNOBJ, ENDJRNLIB), and remove any associated remote   
  journals (RMVRMTJRN command or QjoRemoveRemoteJournal API). With a new      
  journal, start journaling all objects (STRJRNPF, STRJRNAP, STRJRN,          
  STRJRNOBJ, STRJRNLIB) and add any remote journals (ADDRMTJRN command or     
 QjoAddRemoteJournal API).                                                   
   5,7,8,13 -- Report problem (ANZPRB). Then recover as described for reason 
 codes 2-4.                                                                  
   9 -- CHGJRN to attach a new receiver.                                     
   10,14 -- Activate the journal (JRNSTATE parameter on CHGJRN command or the
 QjoChangeJournalState API).                                                 
   11 -- Do not send journal entries to a remote journal, this is not        
 allowed.                                                                    
   12 -- Change the operation attempted so its journal entry will have a size
 less than 4000000000 bytes.                                                 
   15 -- Report the problem (ANZPRB).    

Code 4 -- Journal sequence number is at the maximum value.

Means that Sequence number is on maximum level (this is screenshot from MIMIX) :

                          Data Group Status                           20:12:49 
Data group . . . . :  GROUP         Database errors/rcy.  :         0 /      0 
Elapsed time . . . :  00:32:26      Object in error/active . :      0 /      0 
Transfer definition:  PRIMARY-A     SECONDARY     State  . . : *ASYNC          
---------------------------  Source Statistics ---------------------------     
System:  IBMS1-A     Jrn Mgr-A                               RJLNK Mon-A       
                        Receiver       Sequence #   Date     Time   Trans/Hour 
Database   Source jrn.  #RECVR7454  9,999,999,999 27/09/23 20:10:41       891  
 Link-A    RJ tgt jrn.  #RECVR7454  9,999,999,999 27/09/23 20:10:41       891  
           Last Read .  #RECVR7370  5,624,798,749 27/09/23 12:27:51   194,263 K
           Entries not read:           80,234,435 Est. time to read:  22:31:19 
Object     Current . .  AUDRCV3080  1,613,656,225 27/09/23 20:12:49     1,071 K
 Send-A    Last Read .  AUDRCV3080  1,613,653,987 27/09/23 20:12:48     1,067 K
           Entries not read:                2,238 Est. time to read:      0:07 
---------------------------  Target Statistics ---------------------------     
System:  IBMSRVR     Jrn Mgr-A    DB Rdr- T                  RJLNK Mon-A       
                    Last Received     Unprocessed      Entry Count Est Time    
                     Sequence #       Entry Count      Trans/Hour  To Apply    
 DB  Apply-T      5,624,798,749       542,553,265        368,199 K    4:07:09  
 Obj Apply-A      1,522,869,781                                                
                                                                               

You can check actual settings via CHGJRN command:

CHGJRN JRN(LIBRARY/JOURNAL) + F4
                             Change Journal (CHGJRN)                          
                                                                              
 Type choices, press Enter.                                                   
                                                                              
 Journal  . . . . . . . . . . . . > JOURNAL       Name                        
   Library  . . . . . . . . . . . >   LIBRARY     Name, *LIBL, *CURLIB        
 Journal receiver:                                                            
   Journal receiver . . . . . . .   *SAME         Name, *SAME, *GEN           
     Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB        
   Journal receiver . . . . . . .                 Name, *GEN                  
     Library  . . . . . . . . . .                 Name, *LIBL, *CURLIB        
 Sequence option  . . . . . . . .   *CONT         *CONT, *RESET               
 Journal message queue  . . . . .   XXXXXX        Name, *SAME                 
   Library  . . . . . . . . . . .     LIBRARY     Name, *LIBL, *CURLIB        
 Manage receivers . . . . . . . .   *USER         *SAME, *SYSTEM, *USER       
 Delete receivers . . . . . . . .   *NO           *SAME, *NO, *YES            
 Receiver size options  . . . . .   *RMVINTENT    *SAME, *SYSDFT, *NONE...    
                + for more values   *MAXOPT2                                  
 Journal state  . . . . . . . . .   *SAME         *SAME, *ACTIVE, *INACTIVE...

Important is value :
Receiver size options  *MAXOPT2

*MAXOPT1
    If this is specified for the journal, the journal receiver      
   attached to that journal can have a maximum receiver size of    
   approximately one terabyte (1,099,511,627,776 bytes) and a      
   maximum sequence number of 9,999,999,999.  Additionally, the    
   maximum size of the journal entry which can be deposited is     
   15,761,440 bytes. This value cannot be specified if *MAXOPT2 or 
   *MAXOPT3 is specified.                                          
                                                                   
*MAXOPT2                                                            
   If this is specified for the journal, the journal receiver      
   attached to that journal can have a maximum receiver size of    
   approximately one terabyte (1,099,511,627,776 bytes) and a      
   maximum sequence number of 9,999,999,999.  Additionally, the    
   maximum size of the journal entry which can be deposited is     
   4,000,000,000 bytes. This value cannot be specified if *MAXOPT1 
   or *MAXOPT3 is specified.                                       
                                                                   
*MAXOPT3             
  If this is specified for the journal, the journal receiver      
 attached to that journal can have a maximum receiver size of    
 approximately one terabyte (1,099,511,627,776 bytes) and a      
 maximum sequence number of 18,446,744,073,709,551,600.          
 Additionally, the maximum size of the journal entry which can be
 deposited is 4,000,000,000 bytes.  These journal receivers      
 cannot be saved and restored to any releases prior to V5R3M0 nor
 can they be replicated to any remote journals on any systems at 
 releases prior to V5R3M0.  Also, during an initial program load 
 (IPL) or the vary on of an independent ASP, when MNGRCV(*SYSTEM)
 is specified, the system will not automatically perform a CHGJRN
 command to create and attach a new journal receiver and reset   
 the journal sequence number unless the sequence number exceeds  
 the sequence number threshold which is                          
 18,446,600,000,000,000,000.  This value cannot be specified if  
 *MAXOPT1 or *MAXOPT2 is specified.                                                                             

If your system allow you to put some higher value in this field then nothing is lost.

First, create a new journal receiver according to the existing convention :

CRTJRNRCV JRNRCV(library/next_receiver) 

Then revoke CHGJRN command

CHGJRN JRN(LIBRARY/JOURNAL) + F4

And put new receiver in Journal receiver fields and *MAXOPT3 in Receiver size option field :

                             Change Journal (CHGJRN)                          
                                                                              
 Type choices, press Enter.                                                   
                                                                              
 Journal  . . . . . . . . . . . . > #JOURNAL      Name                        
   Library  . . . . . . . . . . . >   LIBRARY     Name, *LIBL, *CURLIB        
 Journal receiver:                                                            
   Journal receiver . . . . . . . > next_receiver Name, *SAME, *GEN           
     Library  . . . . . . . . . . >   LIBRARY     Name, *LIBL, *CURLIB        
   Journal receiver . . . . . . .                 Name, *GEN                  
     Library  . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB        
 Sequence option  . . . . . . . .   *CONT         *CONT, *RESET               
 Journal message queue  . . . . .   TIMSGQ        Name, *SAME                 
   Library  . . . . . . . . . . .     LIBRARY  Name, *LIBL, *CURLIB        
 Manage receivers . . . . . . . .   *USER         *SAME, *SYSTEM, *USER       
 Delete receivers . . . . . . . .   *NO           *SAME, *NO, *YES            
 Receiver size options  . . . . . > *RMVINTENT    *SAME, *SYSDFT, *NONE...    
                + for more values > *MAXOPT3                                  
 Journal state  . . . . . . . . .   *SAME         *SAME, *ACTIVE, *INACTIVE...

Finally, confirm R in the error message