Highlighted
Absent Member.
Absent Member.
1844 views

copybook

Jump to solution
where is the copybook of my program ?
in which directory?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

No.  You have it confused I think.  Copy books are source code snippets that you, the programmer, optionally include and insert into your source program, using the COPY statement.  You create the copy book as a separate source file, either manually or with a tool, and then you use the COPY statement in your source program to insert the snippet of source code from the copy book file into your source program.  This is much like how other languages allow the use of Include and Import and Using statements to do a similar thing.  The COBOL compiler will "expand" these just prior to compilation and consider them to be part of the source program to be compiled.  See these references:

en.wikipedia.org/.../Include_directive

www.csis.ul.ie/.../Copy.htm

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello,

I'm not sure I understand your question. Are you asking where you should place the copybooks required by your program? If that is what you're asking, then you can either place them in the same directory as the program or specify their location from the Copybook page under the project properties.

Regards,

–Ғɑɳօ
0 Likes
Highlighted
Absent Member.
Absent Member.

i want know if the compiler generates copybooks file of my program

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

No.  You have it confused I think.  Copy books are source code snippets that you, the programmer, optionally include and insert into your source program, using the COPY statement.  You create the copy book as a separate source file, either manually or with a tool, and then you use the COPY statement in your source program to insert the snippet of source code from the copy book file into your source program.  This is much like how other languages allow the use of Include and Import and Using statements to do a similar thing.  The COBOL compiler will "expand" these just prior to compilation and consider them to be part of the source program to be compiled.  See these references:

en.wikipedia.org/.../Include_directive

www.csis.ul.ie/.../Copy.htm

View solution in original post

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.