Output Flat File

For all files involved in the subsetting, the product output is sequential files in the same format of the input. Depending on the mode used to create the method, there are different ways to indicate this output flat file.

If the method was not created (as the new environments must be created only applying data masking techniques), the name of the flat file must be indicated for all the files to be expanded.

Import Method from Referential Integrity

If the method is created by the job Import Method from Referential Integritythe name of the output flat file and the routine used to write it can be specified using Data Subset Extraction. In this case, you must manually update this information in the Elaboration properties windows for all the files involved in the method (see the chapter Work with MethodElaboration Properties in the Data Subset Extraction Guide ). Otherwise, this operation can be done with a query that directly updates the DB2 table HSDCHFIL that contains this information. For example, the following query can be used:

UPDATE EXN01.HSDCHFIL A
SET WRTPGM = 'KDCWRT', UNLOUTNAM = (SELECT 'HAL.KBAIMD.UNLOAD.' CONCAT TSNAME
FROM EXN01.HSURDFIL B
WHERE A.MCRECID = B.MCRECID AND A.FILRECID = B.FILRECID)
WHERE METHOD = 'METHOD4' 

This query updates the name of the routine (field WRTPGM) and the flat file (UNLOUTNAM) for the DB2 tables. The name of the flat file is based on a string to which is added the name of the tablespaces (present in the field TSNAME of the table HSURDFIL: this table contains all the information concerning data stores loaded into Data Express). It is assumed that the names of the tablespaces are always different in order to obtain different flat files. However, if this is not so, this query can be customized for your user environment.

For a sequential file, add a string to the file name as shown in the following query:

UPDATE EXN01.HSDCHFIL A
SET WRTPGM = 'KDCWRT', UNLOUTNAM = (SELECT 'HAL.KBAIMD.UNLOAD.' CONCAT FILNAME
FROM EXN01.HSURDFIL B
WHERE A.MCRECID = B.MCRECID AND A.FILRECID = B.FILRECID)
WHERE METHOD = 'METHOD4'

For both previous queries, the owner of the tables HSDCHFIL and HSURDFIL must be changed in accordance with the parameters specified during the installation of Data Express. Moreover, instead of using the string 'METHOD4' in the field METHOD, you must indicate the name of the method to be executed, and instead of using the string 'HAL .KBAIMD.UNLOAD.' you can indicate another string with the initial part of the output flat file.

Data Extraction Wizard

If the method is created with the Data Subset Extraction wizard, the name of the flat file and the name of the routine used to write it are automatically inserted in the table HSDCHFIL.

The name of the flat file can be generated following one of these three rules:

  1. A prefix is added to the unload data set name, or, if it doesn't exist, to the file name.
  2. A suffix is added to the unload data set name, or, if it doesn't exist, to the file name.
  3. A string replaces a part of the unload data set name or, if it doesn't exist, the file name.

One of these three rules generates a consistent flat file name for all files except the DB2 tables loaded with direct access. For this kind of file, all these three rules would produce a name with the wrong syntax. So, as the DB2 tables with direct access do not have the unload data set name, you can update the field UNLFILNAM in the table HSURDFIL before creating the method. For example, you can use the following query:

UPDATE EXN01.HSURDFIL A
SET UNLFILTYP = 'SEQ', UNLFILNAM = CONCAT ('HAL.KBAIMD.UNLOAD.', TSNAME)
WHERE UNLFILNAM =' AND FILTYPE = 'DB2' 

Also in this query, the owner of the table HSURDFIL must be changed in accordance with the parameters specified during the installation of Data Express, and instead of the string 'HAL .KBAIMD.UNLOAD.you can indicate another string that will be the initial part of the output flat file.