Defining Default Column Names

In Relativity, each data item defined in a file definition (FD) has a default SQL column name based on its COBOL data-name. Most COBOL programs have a data-name for a data item that reflects COBOL coding standards meant to communicate information to the programmer. SQL column names, however, must communicate meaning to the end-user.

Unfortunately, COBOL and SQL have different coding standards for names, and therefore the default SQL column names generated by Relativity takes this into account. An example of this is the hyphen (-) character: since this is a legal character in COBOL, but not in SQL, Relativity removes the hyphens in the default column names.

The first step in augmenting the COBOL file definitions is examining the default column names for each item and altering them to be the desired SQL column name, which includes making them meet SQL's coding requirements for column names, and avoiding reserved words.

One way to change the default column name for a data item is to edit the name directly in the Default Column Name column. Alternatively, use the Edit Default Column Names tool to perform a search and replace.

Whichever method you employ, you cannot use spaces for column names that are to be used in tables. You can use spaces for the names in the FD's Default Column Name column, but when you select the column for inclusion in a table definition, you must enter a valid column name that does not contain any spaces.