Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

xddgen Techniques

This section demonstrates techniques you may need to use so that xddgen can map your COBOL data to SQL.

In many cases xddgen can sqlize your data without any modifications to your copybook. In some situations, the structure of your data will dictate adding directives to your copybook to tell xddgen how to handle the data. You will not need to restructure your data nor will you need to rewrite your application. All you will need to do is add certain directives to the file, which xddgen will read when it sqlizes your data.

The program used in this tutorial lists and counts all credit card holders within a file whose credit card numbers are similar to a sequence provided by the user. Once it processes the whole file, it displays the total count. You must provide a number between 1 and 10 digits. The program always considers only the initial digits of the number.

The main file of this tutorial is CARDFILE, a file that contains records of a reward membership card for customers. This tutorial will take you through the copybook, CARDFILE.FD, and explain how directives can be added to tell xddgen how to handle certain data structures.

In This Section

Using Group Names

Splitting an OCCURR

Combining Multiple XDD Directives

Name Conflicts

HIDDEN Directive

Multi-Record Example

TOCIndex