Retrieving journal entries in a program

 

Use the Retrieve Journal Entry (RTVJRNE) command or the Retrieve Journal Entries (QjoRetrieveJournalEntries) API in a program to retrieve a journal entry and place it in a variable in the program.

You can also use the QjoRetrieveJournalEntries API to retrieve a journal entry and return data which can include pointers.

 

RTVJRNE command

Use the RTVJRNE command in a program to retrieve a journal entry and place it in variables in the program. You can retrieve the following:

  • Sequence number

  • Journal code

  • Entry type

  • Journal receiver name

  • Library name for the journal receiver

  • Journal entry-specific data

You can use this method to create programs to automate recovery. For layout of the fixed-length portion and variable-length portion of a journal entry see the Journal entry information finder.

The RTVJRNE command supports the same selection criteria (database files, data areas, data queues, or integrated file system objects) as the Display Journal (DSPJRN) command. You can specify which entries go to the exit program. For the format of the record for the RTVJRNE command, see the Retrieve Journal Entry (RTVJRNE) Command Description.

 

The QjoRetrieveJournalEntries API

The QjoRetrieveJournalEntries API allows you to retrieve journal entries into a receiver variable. The available journal entry information is similar to what is provided by using the Display Journal (DSPJRN), Receive Journal Entry (RCVJRNE), and Retrieve Journal Entry (RTVJRNE) commands, ",but it also provides additional journal entry data that cannot be retrieved with the Display Journal (DSPJRN) or Retrieve Journal Entry (RTVJRNE) commands. This additional data is accessed using pointers. Refer to Working with pointers in journal entries for more information.

 

Parent topic:

Working with journal entry information

Related concepts
Working with pointers in journal entries Replaying a database operation from a single journal entry