Table of Contents

Search

  1. Preface
  2. Using the Designer
  3. Working with Sources
  4. Working with Flat Files
  5. Working with Targets
  6. Mappings
  7. Mapplets
  8. Mapping Parameters and Variables
  9. Working with User-Defined Functions
  10. Using the Debugger
  11. Viewing Data Lineage
  12. Comparing Objects
  13. Managing Business Components
  14. Creating Cubes and Dimensions
  15. Using the Mapping Wizards
  16. Appendix A: Datatype Reference
  17. Appendix B: Configure the Web Browser

Designer Guide

Designer Guide

Working with COBOL Copybooks

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:
       identification division.        program-id. mead.        environment division.            select file-one assign to "fname".        data division.        file section.        fd  FILE-ONE.
           copy “sample.cpy”.
       working-storage section.        procedure division.            stop run.

0 COMMENTS

We’d like to hear from you!