-EX[TRACT][=file-name]

Transfers information from journal files into files formatted for processing by M routines. It reports the journal time stamps using the $H format, as controlled by the time zone setting from the OS and the process environment for the process running the EXTRACT.

-EXTRACT takes an optional argument, which provides an output file-specification. If the output file specification is not provided, MUPIP JOURNAL derives the output file specification of the extract file using the name of the first journal file that is processed in the forward processing phase and a file type of .mjf. Note that, if multiple journal names are specified in the command line the first journal specified might be different from the first journal processed in the forward phase. When -EXTRACT is specified with -RECOVER (or -ROLLBACK), the -JOURNAL command extracts all the journal records processed during a -RECOVER -FORWARD command or the forward phase of (-RECOVER or -ROLLBACK) -BACKWARD command.

-EXTRACT applies to forward processing of the journal file; if the combined state of the journal file and the Journal Time qualifiers does not cause forward processing, -EXTRACT does not create an output file.

When used independent of -RECOVER (or -ROLLBACK), -EXTRACT option can produce a result even though the database file does not exist, although it does try to access the database if it is available. If accessing the database errors out for some reason, the contents of the journal file can still be extracted by temporarily renaming or moving the database file.

If globals in the database have collation enabled, their collation information is stored in the global variable tree of the database and not in the journal file. A journal extract of such globals without the presence of the corresponding database will not be meaningful as MUPIP JOURNAL has no way of knowing just from the journal files if the globals are collated, and hence it extracts them as if they were uncollated.

Note that, a broken transaction, if found, is extracted to a broken transaction file (refer to “Journal Control Qualifiers” for details), and all future complete transactions are considered as lost transactions, and are extracted to a lost transaction file (refer to “Journal Control Qualifiers” for details).

To avoid broken transaction or lost transaction processing and instead extract all journal records into one file, use the control qualifier -FENCES=NONE. FIS strongly recommended against using  -FENCES=NONE if -RECOVER/-ROLLBACK is also specified.