Reading COBOL Layouts

This tutorial on how to read a COBOL layout was written specifically for our customers who have had a conversion performed at Disc Interchange and have received a COBOL layout with the data.  It is intended to give you enough information to read most simple layouts.  It does not cover all topics or everything you would find in a complex layout, and it is intended to explain COBOL layouts only so you can use your converted data, not so you can write COBOL programs. 

This article begins here: Reading COBOL Layouts where you will also find a topic index.

Part 7: Conclusion

Need to convert COBOL files? Request a COBOL quote
That's our business!
COBOL is a capable language for business and financial applications.  It was designed to accommodate complex data sets while efficiently using computer resources, especially disk space.  The ability to handle multiple record types in a file, to re-use portions of the record (redefined fields), and to permit repeating groups of fields (tables) gives it advantages that other languages didn't have for years after COBOL's introduction.

But it's those very features that can make it difficult to convert COBOL files to PC files.  Most PC applications do not understand any of these concepts, and trying to deal with a complex COBOL file on a PC can be a nightmare.  Disc Interchange deals with these situations every day, and we can offer you several options to cope with these issues when converting a mainframe COBOL file to a PC database.  We often try to simplify the file, split it into multiple PC files, one for each record type, and convert the OCCURS-DEPENDING-ON to multiple PC records. Or if necessary, we can convert the OCCURS-DEPENDING-ON to a fixed number of occurrences.  And of course we always convert comp, comp-3, and Signed fields to leading-sign ASCII numeric fields for the PC.

Although this article presented most common COBOL file features, there are a number of variations that we haven't covered in this tutorial.  But if you understand all the basic examples above, you can manage to read most simple layouts by combining these rules.  Be aware, however, that some data types are dependent upon the COBOL compiler and CPU it runs on (see part 4, Numeric Fields, and our article COBOL Computational Fields).

If you combine all the concepts above and expand the size to several hundred fields, you will get a typical COBOL file such as a medical or financial file. We've seen layouts of 100 pages that contained thousands of fields in a dozen record types.  Often there's a mix of binary and character fields redefining each other, within multiple OCCURS.  Devising a way to get such data into a PC database can be challenging, but it is possible.

COBOL layouts are one of the best known and understood methods of specifying a record layout.  If you process data from a mainframe, you will certainly encounter COBOL layouts.  Investing a little time to understand how to read the layouts, and becoming aware of pitfalls like redefined fields and records, could save you significant grief later.  With a little practice you should find COBOL layouts easy to read, efficient, and concise.

Author's notes:

Length of article: You are likely to encounter each of the above concepts, so I felt it was important to present all of them, and give brief examples.  But I didn't want this to be overwhelmingly long, so I opted for brevity.  However, I feel this tutorial may be too brief to adequately describe some issues.  I welcome feedback on anything that was incomplete, unclear, or omitted.  If you wish to comment, please send an email to   Please put "COBOL" in the subject line.

Questions about COBOL:  While DISC remains committed to providing personalized help to our conversion customers, regrettably I am no longer able to respond to general questions about how to write COBOL programs.  The volume of questions is overwhelming for the time I have available, and it was never my intent to teach COBOL programming.  There are other web sites and many good books written to address COBOL programming.   I sincerely hope this article has been of help to you.

Back to the beginning of the article: Reading COBOL Layouts

Additional Information

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

Our COBOL Conversion Services

Disc Interchange Service Company's primary business is converting mainframe COBOL files.  From the simplest mailing list to the most complex financial data, we have the tools to properly convert and Q.C. your files efficiently and accurately.  With over 32 years of experience with thousands of files, we have the knowledge to catch problems with the data before they cause you grief.

Daily -to- Monthly Repeat Conversions
If you need to convert data on a daily, weekly, or monthly 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 32 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

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