Contributor.
Contributor.
787 views

Cobol Copybook

Is there a way to create one cobol copybook that contains all group level records needed and then access just part of them where needed.  For example, let's say I have a trans-in file and trans-out file.  I want to put the record layout for both in a copybook and then in my FD section only access the necessary group levels needed for the in file and the out file descriptor.  I am relearning cobol from  1983 so i hope this makes sense the way I explained it.

0 Likes
1 Reply
Highlighted
Super Contributor.
Super Contributor.

Are the two 01 records the same length (in bytes)?  If so then putting the copybook in the FD for either the input or output files will cause no problem.  Separate 01 levels in an FD are treated as implicit redefines (therefore the question about lengths).

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.