Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

VSAM Normalizer Transformation

VSAM Normalizer Transformation

The VSAM Normalizer transformation is the source qualifier for a COBOL source definition. A COBOL source is a flat file that can contain multiple-occurring data and multiple types of records in the same file.
VSAM (Virtual Storage Access Method) is a file access method for an IBM mainframe operating system. VSAM files organize records in indexed or sequential flat files. However, you can use the VSAM Normalizer transformation for any flat file source that you define with a COBOL source definition.
A COBOL source definition can have an OCCURS statement that defines a multiple-occurring column. The COBOL source definition can also contain a REDEFINES statement to define more than one type of record in the file.
The following COBOL copybook defines a sales record:
01 SALES_RECORD.      03  HDR_DATA. 05 HDR_REC_TYPE            PIC X. 05 HDR_STORE               PIC X(02).      03 STORE_DATA. 05  STORE_NAME PIC X(30). 05  STORE_ADDR1 PIC X(30). 05  STORE_CITY PIC X(30).      03
DETAIL_DATA REDEFINES STORE_DATA.
05 DETAIL_ITEM PIC 9(9). 05 DETAIL_DESC PIC X(30). 05 DETAIL_PRICE PIC 9(4)V99. 05 DETAIL_QTY PIC 9(5). 05
SUPPLIER_INFO OCCURS 4 TIMES
. 10 SUPPLIER_CODE PIC XX. 10 SUPPLIER_NAME PIC X(8).
The sales file can contain two types of sales records. Store_Data defines a store and Detail_Data defines merchandise sold in the store. The REDEFINES clause indicates that Detail_Data fields might occur in a record instead of Store_Data fields.
The first three characters of each sales record is the header. The header includes a record type and a store ID. The value of Hdr_Rec_Type defines whether the rest of the record contains store information or merchandise information. For example, when Hdr_Rec_Type is “S,” the record contains store data. When Hdr_Rec_Type is “D,” the record contains detail data.
When the record contains detail data, it includes the Supplier_Info fields. The OCCURS clause defines four suppliers in each Detail_Data record.
The following figure shows the Sales_File COBOL source definition that you might create from the COBOL copybook:
The Sales_File COBOL source definition shows the port name, level, occurs, datatype, and length columns.
The Sales_Rec, Hdr_Data, Store_Data, Detail_Data, and Supplier_Info columns are group-level columns that identify groups of lower level data. Group-level columns have a length of zero because they contain no data. None of these columns are output ports in the source definition.
The Supplier_Info group contains Supplier_Code and Supplier_Name columns. The Supplier_Info group occurs four times in each Detail_Data record.
When you create a VSAM Normalizer transformation from the COBOL source definition, the Mapping Designer creates the input/output ports in the Normalizer transformation based on the COBOL source definition. The Normalizer transformation contains at least one generated key output port. When the COBOL source has multiple-occurring columns, the Normalizer transformation has a generated column ID output port.
The following figure shows the Normalizer transformation ports the Mapping Designer creates from the source definition:
 The Normalizer transformation ports are HDR_REC_TYPE, HDR_STORE, BODY_STORE_NAME, BODY_STORE_ADDR1, BODY_STORE_CITY, DETAIL_ITEM, DETAIL_DESC, DETAIL_PRICE, DETAIL_QTY, SUPPLIER_CODE, and SUPPLIER_NAME.
The Supplier_Info group of columns occurs four times in each COBOL source row.
The COBOL source row might contain the following data:
Item1 ItemDesc 100 25 A Supplier1 B Supplier2 C Supplier3 D Supplier4
The Normalizer transformation returns a row for each occurrence of the Supplier_Code and Supplier_Name columns. Each output row contains the same item, description, price, and quantity values.
The Normalizer returns the following detail data rows from the COBOL source row:
Item1 ItemDesc 100 25 A Supplier1 1 1 Item1 ItemDesc 100 25 B Supplier2 1 2 Item1 ItemDesc 100 25 C Supplier3 1 3 Item1 ItemDesc 100 25 D Supplier4 1 4
Each output row contains a generated key and a column ID. The Integration Service updates the generated key value when it processes a new source row. In the detail data rows, the generated key value is 1.
The column ID defines the Supplier_Info column occurrence number. The Integration Service updates the column ID for each occurrence of the Supplier_Info. The column ID values are 1, 2, 3, 4 in the detail data rows.

0 COMMENTS

We’d like to hear from you!