To provide support for mainframe source data, you can import a COBOL file as a source definition in the Designer. COBOL files are fixed-width files that may contain text and binary data. PowerCenter supports the following code pages for COBOL files:
You can import shift-sensitive COBOL files that do not contain shift keys. Define the shift states for each column in the COBOL source definition.
COBOL sources often denormalize data and compact the equivalent of separate table records into a single record. You use the Normalizer transformation to normalize these records in the mapping.
After you import a COBOL source definition, review and configure the COBOL file to create record groups. COBOL files often represent the functional equivalent of multiple source tables within the same set of records. When you review the structure of the COBOL file, you can adjust the description to identify which groups of fields constitute a single pseudo- table.
Importing COBOL Sources
The Designer uses the data structures stored in the Data Division of a COBOL program to create a source definition. When you import a COBOL file, the Designer looks for a specific COBOL file format, which is different than the standard ANSI format.
The Designer looks for a COBOL file format similar to the following example:
Working with COBOL Copybooks
The Designer cannot recognize a COBOL copybook (.cpy file) as a COBOL file (.cbl file) because it lacks the proper format. To import a COBOL copybook in the Designer, you can insert it into a COBOL file template by using the COBOL statement “copy.” After you insert the copybook file into the COBOL file template, you can save the file as a .cbl file and import it in the Designer.
If the .cbl file and the .cpy file are not in the same local directory, the Designer prompts for the location of the .cpy file.
When the COBOL copybook file contains tabs, the Designer expands tabs into spaces. By default, the Designer expands a tab character into eight spaces. You can change this default setting in powrmart.ini. You can find powrmart.ini in the root directory of the PowerCenter Client installation.
To change the default setting, add the following text to powrmart.ini:[AnalyzerOptions] TabSize=n
where n is the number of spaces the Designer reads for every tab character. To apply changes, restart the Designer.
For example, the COBOL copybook file is called sample.cpy. The COBOL file below shows how to use the copy statement to insert the sample copybook into a COBOL file template:
Steps to Import a COBOL Source Structure
To import a COBOL source structure, complete the following steps.
To import a COBOL source structure:
This is the code page of the COBOL file (.cbl), not the data file. The code page mus t be compatible with the PowerCenter Client code page.
When you select this code page, the data file uses this code page by default. After you import the COBOL file, you can configure the code page of the source data when you adjust the source definition or when you run the workflow.
The Designer lists the five code pages you have most recently selected. Then it lists all remaining code pages in alphabetical order.
The COBOL source definition appears in the Designer. More than one definition may appear if the COBOL file has more than one FD entry.
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.