Académique Documents
Professionnel Documents
Culture Documents
By
PenchalaRaju.Yanamala
Transformation type:
Active
Connected
For example, you might have a relational table that stores four quarters of sales
by store. You need to create a row for each sales occurrence. You can configure
a Normalizer transformation to return a separate row for each quarter.
The Normalizer returns a row for each store and sales combination. It also
returns an index that identifies the quarter number:
Store1 100 1
Store1 300 2
Store1 500 3
Store1 700 4
Store2 250 1
Store2 450 2
Store2 650 3
Store2 850 4
The Normalizer transformation generates a key for each source row. The
Integration Service increments the generated key sequence number each time it
processes a source row. When the source row contains a multiple-occurring
column or a multiple-occurring group of columns, the Normalizer transformation
returns a row for each occurrence. Each row contains the same generated key
value.
When the Normalizer returns multiple rows from a source row, it returns duplicate
data for single-occurring source columns. For example, Store1 and Store2 repeat
for each instance of sales.
Ports Tab
When you define a Normalizer transformation, you configure the columns in the
Normalizer tab. The Designer creates the ports. You can view the Normalizer
ports and attributes on the Ports tab.
The Normalizer transformation has one output port for each single-occurring
input port. When a source column is multiple-occurring, the pipeline and VSAM
Normalizer transformations have one output port for the column. The
transformation returns a row for each source column occurrence.
The Normalizer transformation has a generated column ID (GCID) port for each
multiple-occurring column. The generated column ID is an index for the instance
of the multiple-occurring data. For example, if a column occurs four times in a
source record, the Normalizer returns a value of 1, 2, 3, or 4 in the generated
column ID based on which instance of the multiple-occurring data occurs in the
row.
The Normalizer transformation has at least one generated key port. The
Integration Service increments the generated key sequence number each time it
processes a source row.
You can change the generated key start values on the Ports tab. You can enter
different values for each generated key. When you change a start value, the
generated key value resets to the start value the next time you run a session.
Properties Tab
Normalizer Tab
The Normalizer tab defines the structure of the source data. The Normalizer tab
defines source data as columns and groups of columns. A group of columns
might define a record in a COBOL source or it might define a group of multiple-
occurring fields in the source.
The column level number identifies groups of columns in the data. Level numbers
define a data hierarchy. Columns in a group have the same level number and
display sequentially below a group-level column. A group-level column has a
lower level number, and it contains no data.
The following table describes the Normalizer tab attributes that are common to
the VSAM and pipeline Normalizer transformations:
Attribute Description
Column Name of the source column.
Name
Level Group columns. Columns in the same group occur beneath a column
with a lower level number. When each column is the same level, the
transformation contains no column groups.
Occurs The number of instances of a column or group of columns in the
source row.
Datatype The transformation column datatype can be String, Nstring, or Number.
Prec Precision. Length of the column.
Scale Number of decimal positions for a numeric column.
The Normalizer tab for a VSAM Normalizer transformation contains the same
attributes as the pipeline Normalizer transformation, but it includes attributes
unique to a COBOL source definition.
The Normalizer transformation returns at least one generated key column in the
output row. The Integration Service increments the generated key sequence
number each time it processes a source row. The Integration Service determines
the initial key value from the generated key value in the Ports tab of the
Normalizer transformation. When you create a Normalizer transformation, the
generated key value is 1 by default. The naming convention for the Normalizer
generated key is GK_<redefined_field_name>.
Related Topics:
Generating Key Values.
You can view the current generated key values on the Normalizer transformation
Ports tab. At the end of each session, the Integration Service updates the
generated key value in the Normalizer transformation to the last value generated
for the session plus one. The maximum generated key value is
9,223,372,036,854,775,807. If you have multiple instances of the Normalizer
transformation in the repository, the Integration Service updates the generated
key value in all versions when it runs a session.
Note: Change the generated key sequence number only when you need to
change the sequence. The Integration Service might pass duplicate keys to the
target when you reset a generated key that exists in the target.
You can change the generated key value in the following ways:
Modify the generated key sequence value. You can modify the generated key
sequence value on the Ports tab of the Normalizer transformation. The
Integration Service assigns the sequence value to the first generated key it
creates for that column.
Reset the generated key sequence. Reset the generated key sequence on the
Normalizer transformation Properties tab. When you reset the generated key
sequence, the Integration Service resets the generated key start value back to
the value it was before the session. Reset the generated key sequence when
want to create the same generated key values each time you run the session.
Restart the generated key sequence. Restart the generated key sequence on
the Normalizer transformation Properties tab. When you restart the generated
key sequence, the Integration Service starts the generated key sequence at 1
the next time it runs a session. When you restart the generated key sequence,
the generated key start value does not change in the Normalizer transformation
until you run a session. When you run the session, the Integration Service
overrides the sequence number value on the Ports tab.
When you reset or restart the generated key sequence, the reset or restart
affects the generated key sequence values the next time you run a session. You
do not change the current generated key sequence values in the Normalizer
transformation. When you reset or restart the generated key sequence, the
option is enabled for every session until you disable the option
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.
01 SALES_RECORD.
03 HDR_DATA.
05 HDR_REC_TYPE PIC X.
03 STORE_DATA.
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.
In Figure 16-3, the Supplier_Info group of columns occurs four times in each
COBOL source row.
The Normalizer returns the following detail data rows from the COBOL source
row:
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 VSAM Normalizer Ports tab shows the transformation input and output ports.
It has one input/output port for each COBOL source column. It has one
input/output port for a multiple-occurring column. The transformation does not
have input or output ports for group level columns.
The following table describes attributes on the the VSAM Normalizer tab:
Attribute Description
POffs Physical offset. Location of the field in the file. The first byte in the file
is zero.
Plen Physical length. Number of bytes in the field.
Column Name of the source field.
Name
Level Provides column group hierarchy. The higher the level number, the
lower the data is in the hierarchy. Columns in the same group occur
beneath a column with a lower level number. When each column is
the same level, the transformation contains no column groups.
Occurs The number of instances of a column or group of columns in the
source row.
Datatype The transformation datatype can be String, Nstring, or Number.
Prec Precision. Length of the column.
Scale Number of decimal positions for a numeric column.
Picture How the data is stored or displayed in the source. Picture 99V99
defines a numeric field with two implied decimals. Picture X(10)
indicates ten characters.
Usage COBOL data storage format such as COMP, BINARY, and COMP-3.
When the Usage is DISPLAY, the Picture clause defines how the
source data is formatted when you view it.
Key Type Type of key constraint to apply to this field. When you configure a
field as a primary key, the Integration Service generates unique
numeric IDs for this field when running a session with a COBOL
source.
Signed (S) Indicates whether numeric values are signed.
Trailing Sign Indicates that the sign (+ or -) exists in the last digit of the field. If not
(T) enabled, the sign appears as the first character in the field.
Included Indicates whether the sign is included in any value appearing in the
Sign (I) field.
Real Indicates whether the decimal point is a period (.) or the decimal
Decimal point is represented by the V character in a numeric field.
Point (R)
Redefines Indicates that the column REDEFINES another column.
Business Descriptive name that you give to a column.
Name
When you create a VSAM Normalizer transformation, you drag a COBOL source
into a mapping and the Mapping Designer creates the transformation columns
from the source. The Normalizer transformation is the source qualifier for the
COBOL source in the mapping.
When you add a COBOL source to a mapping, the Mapping Designer creates
and configures a Normalizer transformation. The Mapping Designer identifies
nested records and multiple-occurring fields in the COBOL source. It creates the
columns and ports in the Normalizer transformation from the source columns.
1.In the Mapping Designer, create a new mapping or open an existing mapping.
2.Drag a COBOL source definition into the mapping.
The Designer adds a Normalizer transformation and connects it to the COBOL source
definition. If you have not enabled the option to create a source qualifier by default, the
Create Normalizer Transformation dialog box appears.
If the Create Normalizer
Transformation dialog box
appears, you can choose from
3. the following options:
VSAM Source. Create a transformation from the COBOL
source definition in the mapping.
Pipeline. Create a transformation, but do not define columns from a COBOL
source. Define the columns manually on the Normalizer tab. You might choose
this option when you want to process multiple-occurring data from another
transformation in the mapping.
To create the VSAM Normalizer transformation, select the VSAM Normalizer
transformation option. The dialog box displays the name of the COBOL source definition
in the mapping. Select the COBOL source definition and click OK.
4.Open the Normalizer transformation.
5.Select the Ports tab to view the ports in the Normalizer transformation.
The Designer creates the ports from the COBOL source definition by default.
6.Click the Normalizer tab to review the source column organization.
The Normalizer tab contains the same information as the Columns tab of the COBOL
source. However, you cannot modify column attributes in the Normalizer transformation.
To change column attributes, change the COBOL copybook, import the COBOL source,
and recreate the Normalizer transformation.
7.Select the Properties tab to set the tracing level.
You can also configure the transformation to reset the generated key sequence
numbers at the start of the next session.
Dellmark 100 1 1
Dellmark 450 1 2
Dellmark 650 1 3
Dellmark 780 1 4
Tonys 666 2 1
Tonys 333 2 2
Tonys 444 2 3
Tonys 555 2 4
The Integration Service increments the generated key sequence number each
time it processes a source row. The generated key links each quarter sales to the
same store. In this example, the generated key for the Dellmark row is 1. The
generated key for the Tonys store is 2.
The pipeline Normalizer Ports tab displays the input and output ports for the
transformation. It has one input/output port for each single-occurring column you
define in the transformation. It has one port for each occurrence of a multiple-
occurring column. The transformation does not have input or output ports for
group level columns.
Using a Normalizer Transformation in a Mapping
When a Normalizer transformation receives more than one type of data from a
COBOL source, you need to connect the Normalizer output ports to different
targets based on the type of data in each row. The following example describes
how to map the Sales_File COBOL source definition through a Normalizer
transformation to multiple targets.
The COBOL source definition and the Normalizer transformation have columns
that represent fields in both types of records. You need to filter the store rows
from the item rows and pass them to different targets.
The mapping filters multiple record types from the COBOL source to relational
targets. The the multiple-occurring source columns are mapped to a separate
relational table. Each row is indexed by occurrence in the source row.
The Normalizer transformation passes the header record type and header store
number columns to the Sales_Header target. Each Sales_Header record has a
generated key that links the Sales_Header row to a Store_Data or Detail_Data
1.target row. The Normalizer returns Hdr_Data and Store_Data once per row.
The Normalizer transformation passes all columns to the Router
transformation. It passes Detail_Data data four times per row, once for each
occurrence of the Supplier_Info columns. The Detail_Data columns contain
2.duplicate data, except for the Supplier_Info columns.
The Router transformation passes the store name, address, city, and
generated key to Store_Data when the Hdr_Rec_Type is “S.” The generated
3.key links Store_Data rows to Sales_Header rows.
The Router transformation contains one user-defined group for the store data
and one user-defined group for the merchandise items.
The Router transformation passes the item, item description, price, quantity,
and Detail_Data generated keys to an Aggregator transformation when the
4.Hdr_Rec_Type is “D.”
The Router transformation passes the supplier code, name, and column ID to
the Suppliers target when the Hdr_Rec_Type is “D”. It passes the generated
5.key that links the Suppliers row to the Detail_Data row.
The Aggregator transformation removes the duplicate Detail_Data columns.
The Aggregator passes one instance of the item, description, price, quantity,
and generated key to Detail_Data. The Detail_Data generated key links the
Detail_Data rows to the Suppliers rows. Detail_Data also has a key that links
6.the Detail_Data rows to Sales_Header rows.
Link the Normalizer output columns to the following objects:
Troubleshooting
When you create ports manually, add them on the Normalizer tab in the
transformation, not the Ports tab.
Verify that the COBOL program follows the COBOL standard, including spaces,
tabs, and end of line characters. The COBOL file headings should be similar to
the following text:
identification division.
program-id. mead.
environment division.
data division.
file section.
fd FILE-ONE.
The Designer does not read hidden characters in the COBOL program. Use a
text-only editor to make changes to the COBOL file. Do not use Word or
Wordpad. Remove extra spaces.
A session that reads binary data completed, but the information in the target
table is incorrect.
Edit the session in the Workflow Manager and verify that the source file format is
set correctly. The file format might be EBCDIC or ASCII. The number of bytes to
skip between records must be set to 0.
I have a COBOL field description that uses a non-IBM COMP type. How should I
import the source?