Redefined Fields & Records:

This is a discussion of redefined fields and redefined records, what they are, why they are used, and how to deal with them on a PC.

Redefined Fields:

Mainframe languages, especially COBOL, often reuse, or "redefine" an area in a record to save space. A common example is a mailing list where the addressee may be either a person or a company, but never both.  To include both an individual name field and a company name field would waste space, since only one of them would ever be filled, so the name field can be reused (redefined) as company name.  Further, the individual name is usually composed of two fields, last name and first name, so for example, bytes 1-12 might be last name, and bytes 13-20 first name.  But when redefined, bytes 1-20 would be the company name.  Most PC applications do not deal with this well.
Need to convert COBOL files? Request a COBOL quote
That's our business!

A COBOL layout fragment for this example is:

           05  INDIVIDUAL-NAME.
               10  LAST-NAME                           PIC X(12).
               10  FIRST-NAME                          PIC X(8).
           05  COMPANY-NAME REDEFINES INDIVIDUAL-NAME  PIC X(20).
(See Reading COBOL Layouts for more information.)

For example, take two records, one for the individual  "Smith      John   " and the other for the company "Disc Interchange   ".  If you ignore the redefined issue, and treat the field as the company definition, then "Disc Interchange" will be correct, but the mail to John Smith will be addressed to "Smith       John".  If you treat the fields as individual name fields and put the first name before the last name, then the individual's name will be correct, like "John Smith", but any company name will get scrambled, like "ange Disc Interch".   If your application can't deal with this, we can convert the data to a record with both individual name fields and company name fields.

Often the redefined fields are of a different type altogether.  For example, redefining a character field as a binary field.  This is much more serious than the above example, and the original field and the redefined field require different conversions (character and binary).

Redefined Records:

Complex data sets usually cannot store all their data in just one record type, so they have multiple record types.  For example, medical records may have a record type to identify a patient (name, address, etc.), another record type for treatment data, and a third for payment information.  These could be stored in three files, or in one.  If they are stored in one file, then that file has "multiple record types", or "redefined records".  PC databases can make use of relational tables (or files), but usually can't deal with all three record types in one file.  DISC can split the data into three files so you can build a relational database on your PC.

For more detail on redefined records, and solutions for converting them to PC files, see Part 6 of Reading COBOL Layouts

Additional Information

For more articles on data conversion, see our TechTalk Index.

Our COBOL Conversion Services

Disc Interchange Service Company has years of experience dealing with COBOL files containing redefined fields and records. We employ many methods to convert the data to a PC database.  With over 24 years of experience with thousands of files, we have the knowledge to suggest the best options for handling redefined fields and multiple record types.

We are especially good at automating repeat conversions of files with multiple record types.  If you need to convert the same data on a regular basis, we can write a custom program to convert and Q.C your data to your specifications.  Our experience in automating the conversion process results in significantly lower cost, and excellent quality-control. 
 

Mainframe & AS/400 Conversions
Mainframe & AS/400 Conversion to PC

With 24 years experience, we are the experts at transferring mainframe data to PCs.
Get more information on IBM Mainframe conversions
Request a COBOL quote

Disc Interchange Service Company, Inc.
Media Conversion Specialists
15 Stony Brook Road
Westford, MA 01886
(978) 692-0050

Copyright © 1997 - 2007 by Disc Interchange
All rights reserved. See our copyright page.

Home