RockBoro
RockBoro

Reputation: 2473

DSPJRN only shows entries for table after it was recreated

After deleting and then recreated a table, why does the DSPJRN command only show entries for the table starting from the time the new table was created?

DSPJRN JRN(WLKLIB/JRN) FILE((DSHPF16))  
                                                                               
 Journal  . . . . . . :   JRN             Library  . . . . . . :   WLKLIB      
 Largest sequence number on this screen  . . . . . . : 00000000000000475862    
 Type options, press Enter.                                                    
   5=Display entire entry                                                      
                                                                               
 Opt    Sequence  Code  Type  Object      Library     Job         Time         
          475855   J     XP   DSHPF16     WLKLIB      STEVE25     19:15:28     
          475858   D     CT   DSHPF16     WLKLIB      STEVE25     19:15:28     
          475859   D     JF   DSHPF16     WLKLIB      STEVE25     19:15:28     
          475860   F     JM   DSHPF16     WLKLIB      STEVE25     19:15:28     
          475861   D     MA   DSHPF16     WLKLIB      STEVE25     19:15:28     
          475862   F     MC   DSHPF16     WLKLIB      STEVE25     19:15:28     

If I specify FILE(*ALLFILE) and a starting sequence number, the DSPJRN command does show entries for the table before it was deleted and recreated.

DSPJRN JRN(JRN) FILE(*ALLFILE) FROMENTLRG(475850) 


Journal  . . . . . . :   JRN             Library  . . . . . . :   WLKLIB   
Largest sequence number on this screen  . . . . . . : 00000000000000475861 
Type options, press Enter.                                                 
  5=Display entire entry                                                   
                                                                           
Opt    Sequence  Code  Type  Object      Library     Job         Time      
         475850   D     DT   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475851   F     MD   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475852   J     XP   DSHPF16     WLKLIB      QDBSRV01    19:15:28  
         475853   D     DF   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475854   J     XP   DSHPF16     WLKLIB      QDBSRV01    19:15:28  
         475855   J     XP   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475856   C     BC                           STEVE25     19:15:28  
         475857   C     SC                           STEVE25     19:15:28  
         475858   D     CT   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475859   D     JF   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475860   F     JM   DSHPF16     WLKLIB      STEVE25     19:15:28  
         475861   D     MA   DSHPF16     WLKLIB      STEVE25     19:15:28  

There are entries in the journal for the file. But I cannot display the entries that precede the create of the table when I use the FILE parameter.

What I want to do is use APYJRNCHG command to recover records from the file before it was recreated. But the command does not accept the journal entry range.

APYJRNCHG JRN(WLKLIB/JRN) FILE((WLKLIB/DSHPF16)) RCVRNG(*CURRENT)  
      fromENTLRG(478850) TOENTLRG(478850)                          
FROM and TO values not valid.                                      

Upvotes: 0

Views: 121

Answers (1)

RockBoro
RockBoro

Reputation: 2473

https://www.ibm.com/support/pages/overview-journal-identifier-jid-and-why-dspjrn-apyjrnchg-does-not-display-or-apply-all-entries-certain-file#:~:text=A%20Journal%20Identifier%20(JID)%20is%20an%20identifier%20that%20is%20unique,when%20the%20object%20is%20restored.

all objects have a journal identifier. When a table is deleted and then created again it is assigned a new journal identifier. When you run the DSPJRN or APYJRNCHG command for a specific table, only journal entries which match the current journal identifier of the table are selected.

Upvotes: 0

Related Questions