Instead of loading a target, you can also use DataMigrator to extract data from a data source and create input files for a packaged application that requires RECTYPEs indicating different record layouts.
DataMigrator can create a flat file containing the different record layouts. This requires a data flow that loads a sequential file with a previously defined layout. The synonym for the sequential file contains one segment for each RECTYPE, along with all the associated columns. The RECTYPE identifies the type of record in the ALIAS. Each segment has a unique value for RECTYPE.
The following example creates a flat file containing two RECTYPEs. DMORD, an orders table, is the data source. Extracted records are loaded into one sequential file data target, DMORECS, which contains two segments.
The first segment contains the header information, indicated by a RECTYPE of 'H', and includes the columns ORDER_DATE, STORE_CODE and PLANT.
The second segment contains the detail information, indicated by a RECTYPE of 'D', and includes the columns PROD_NUM, QUANTITY, and LINEPRICE.
The graphical view of the DMORECS synonym shows how the two segments are related. OINFO contains the header records; PINFO contains the detail records.
Refer to the sample data flow DMRCTYP for the complete example.
In the DMC:
The Column Selection window opens.
The erties dialog box opens.
The Transformation window opens.
The Transformation window should appear as shown in following image.
Note that only the RECTYPE columns remain unmapped. The RECTYPE values are assigned automatically at load time based on the value given for the RECTYPE in the synonym, in this case, H or D.
The Transformation Calculator opens.
To view the output file created by the data flow, edit the file created by the data flow. For example, on Windows, use Notepad to edit.
\ibi\apps\ibisamp\dmorecs.ftm
Note that the output file contains records with two different layouts.
iWay Software |