How to Gather the Header Information and the Content of an Export Dumpfile?

I’ve found a great document at My Oracle Support (Metalink): How to Gather the Header Information and the Content of an Export Dumpfile? [ID 462488.1]. The document explains how to extract DDL statements from dumpfiles and how to use GET_DUMPFILE_INFO procedure (of DBMS_DATAPUMP package) to gather header information for both original and datapump exports.

In summary,

The Data Definition Language (DDL) statements in a DataPump dumpfile can be extracted with the parameter SQLFILE:

Note: This command will not import the data, but it still needs a valid database connection.

The Data Definition Language (DDL) statements in a original export file can be extracted with the parameter SHOW:

Sample PL/SQL code which uses DBMS_DATAPUMP.GET_DUMPFILE_INFO can be found at MOS [ID 462488.1]. Unfortunately this procedure can only be used in an Oracle10g Release 2 or any higher release database.

After I’ve made some tests with PL/SQL code, I decided to examine Oracle export files and write my own utility to read the header information.