Thread: COBOL

What is a copybook and how do I use COPY?

Started by Sam • user3 replies179 viewsLast activity 3 weeks ago
Post #1
0 votes
Sam
Reputation
5
Posts: 28
Joined: Jul 1, 2026, 2:30 PM
Posted: Jul 22, 2026, 12:35 PM

People keep saying "check the copybook." Is that just a shared include file? How do I pull it into my program?

Post #2
1 votes
Anita
Reputation
118
Posts: 23
Joined: May 29, 2025, 12:45 PM
Posted: Jul 22, 2026, 2:35 PM

Yes, shared source snippet, usually a record layout. In your program:

COPY CUSTREC.

Compile JCL needs the library on SYSLIB. Member name is CUSTREC in that PDS.

Post #3
0 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Jul 22, 2026, 5:35 PM

Do not put random executable paragraphs in copybooks as a beginner. Layouts and 88-levels first.

You must be signed in to reply to this thread