Download and Catalog DB2 Data

Guides you through the steps required to copy the LOAD control statement from the mainframe to your Windows machine using Micro Focus Mainframe Access Drag and Drop, and to copy the unloaded DB2 data to your Windows machine using Micro Focus Mainframe Access command-line tools.

Copy the LOAD control statement

  1. Start an Enterprise Developer command prompt (either 32-bit or 64-bit).
  2. Enter mfdasmx at the command prompt to launch Micro Focus Mainframe Access Drag and Drop.
  3. In the User Identification field, type your mainframe user ID.
  4. In the Current field, type your mainframe password.
  5. In the Catalog search criteria field, enter the PDS prefix for the PDS that contains your LOAD control statement; then click OK.
  6. Click Configure > Options.
  7. In the EBCDIC/ASCII translation group, check Sequential; then click OK.
  8. Drag and drop the mainframeID.UTILBTS.PUNCH1 file from the right pane to a destination folder in the left pane.
  9. Click OK on each popup notice.
  10. Close Mainframe Access Drag and Drop.

Copy and catalog the unloaded DB2 data

In this section, you use the MFDAS command line utility. Ensure that you have configured this utility by running Mainframe Access Configuration and MDFAS SETUSER. See Starting the Mainframe Access Configuration Utility for instructions on how to do this.

  1. Start an Enterprise Developer command prompt as an administrator. If you need instructions, see To start an Enterprise Developer command prompt as an administrator.
  2. At the command prompt, enter the following to copy the unloaded data in mainframeID.UTILBTS.SYSREC1 to a data file, DSN81110_EMP.DAT, and catalog mainframeID.UTILBTS.SYSREC1 in your DSNUTILS enterprise server region:
    MFDAS IMPORT datFilePath\DSN81110_EMP.DAT FROM QSAM 
    mainframeID.UTILBTS.SYSREC1 /CATLOC=ESWorkArea\JCL1\New_configuration.bin\catalog.dat
    Where:
    Data Description
    mainframeID The dataset qualifier
    datFilePath The local path to the directory where you want to store the extracted data file
    DSN81110_EMP.DAT The name of the data file containing extracted data
    ESWorkArea The Enterprise Server WORKAREA folder. Since the enterprise server is created with Project JCL1, it uses the project executable folder, which is C:\tutorials\MBDT\JCL1\bin\x86\Debug .
    New_configuration.bin The folder holding the enterprise server region metadata.
    catalog.dat The name of the enterprise server catalog data file.
    After the command has completed, the mainframeID.UTILBTS.SYSREC1 data set has been copied to the DSN81110_EMP.DAT file and cataloged as mainframeID.UTILBTS.SYSREC1 in your enterprise server region.