Importing Data

You can import individual members, or a collection of members defined by a filter, from the JES spool, a partitioned data set or source code control system, or you can import entire QSAM, VSAM data sets, IMS databases or DB/2 tables, with automatic data conversion to the appropriate Micro Focus format. You may optionally specify a control file containing one or more commands and allow MFDAS to run them as a batch. To do this, place the commands in a control file of any name, without the preceding MFDAS parameter, then run MFDAS with the parameter @filename, where filename is the name of the control file.

Note: You can configure user exits to perform actions after a successful import.

Text or binary transfers are possible. Use the BINARY or TEXT operand to override the default transfer type for the type. The default transfer type for PDS, Librarian, Panvalet or Endevor is TEXT. The default transfer type for QSAM is BINARY. VSAM, IMS and DB/2 cannot be overridden.

The MEMBER parameter can specify a specific mainframe member name, or can include special filter characters to allow multiple imports to occur based on the special filter characters that you specify. These special filter characters are:

Example import commands are shown below.

JES

To import from the mainframe JES2 or JES3 spool:

MFDAS IMPORT filename FROM JES
JOB#####|filter

PDS

To import from a Partitioned data set:

MFDAS IMPORT {BINARY | TEXT} filename FROM PDS
pdsname
MEMBER {memname|filter}

Librarian

To import from a Librarian data set:

MFDAS IMPORT {BINARY | TEXT} filename FROM LIB
libname
MEMBER {memname|filter}

Panvalet

To import from a Panvalet data set:

MFDAS IMPORT {BINARY | TEXT} filename FROM PAN
panname
MEMBER {memname|filter}

Endevor

To import from an Endevor data set:

MFDAS IMPORT {BINARY | TEXT} filename FROM END
ENV 'env' SYS 'sys' SUB 'sub' 
MEMBER {memname|filter} 
STG 'stage' 
TYPE memtype
CCID change-control-id
COMMENT user-comment
OVERRIDE SIGNOUT
LOCK=YES

QSAM

To import from a QSAM data set with automatic data conversion:

MFDAS
IMPORT {BINARY | TEXT} filename FROM QSAM
qsamname

VSAM KSDS

To import from a VSAM KSDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use KSDS-FIXED instead of KSDS.

MFDAS IMPORT filename FROM KSDS
vsamksdsname

VSAM ESDS

To import from a VSAM ESDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use ESDS-FIXED instead of ESDS.

MFDAS IMPORT filename FROM ESDS
vsamesdsname

VSAM RRDS

To import from a VSAM RRDS data set with automatic data conversion and produce a variable length workstation indexed file. If you wish to produce a fixed length indexed file, then use RRDS-FIXED instead of RRDS.

MFDAS IMPORT filename FROM RRDS
vsamrrdsname

IMS Database

To import from an unloaded IMS database with automatic data conversion and produce a workstation PCIMS format database. Three additional parameters are available after the mainframe IMS unloaded data setname field. These parameters are the required database name, location of segment name in the data record (relative to 1) and the location of the segment data in the data record (relative to 1). If the mainframe database has been unloaded using the Micro Focus PCIMS unload utility, then these three fields are not required, as they are automatically picked up from the mainframe unloaded data set.

MFDAS IMPORT filename FROM IMS
imsunloadedname
[databasename]
[segmentnamelocation]
[segmentdatalocation]
Note: To view the database after import, you must also point the ES_IMSLIB environment variable at the generated DBD files (dbdgen2.dat and dbdgen2f.dat), ES_IMSDAT at the actual IMS database file, and ES_IMSWRK to a location that listing and log files can be written to (although, if this variable is not set, the listing and log files are created in the current directory).

DB/2 Table

To import from an unloaded DB/2 table with automatic data conversion and produce a workstation XDB format table. Three additional parameters are required after the mainframe DB/2 unloaded data setname field. These parameters are the required location, authid, and table name. The mainframe table must have been unloaded into a sequential file using the DSNTIAUL DB/2 unload utility. The table must exist and the SQLWizard must be available on the path.

MFDAS IMPORTfilename FROM DB2
db2unloadedname location
authid tablename