|
|
| Author |
Message |
Mayos
New User
Joined: 11 Apr 2005 Posts: 16
|
|
|
|
Hello,
Just want to know what a copybook is and what is a copylib and when it is used in the jcl.
Many thanks. |
|
| Back to top |
|
 |
References
|
Posted: Thu Apr 14, 2005 3:46 pm Post subject: Re: What is Copybook and Copylib |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3081 Location: Charlotte,NC USA
|
|
|
|
| They aren't. Those are terms relating to COBOL programs. |
|
| Back to top |
|
 |
andycool
Active User
Joined: 12 Apr 2005 Posts: 65
|
|
|
|
Hi Mayos,
1. A COPYBOOK can contain some portion of your COBOL program.
For instance you have two programs: prog1 and prog2.
Both of these use a same set of working storage variables. Here, instead of using them twice in both programs, you can make a COPYBOOK ie another pgm/dataset letz say "progcpy", wch will only contain these working storage variables and nothing else.
This is called a working storage cpybook. You can incluse this "progcpy" in both of your pgms by using the statement:
====prgcpy====
05 working_variable1
05 working_variable2
05 working_variable3
============
prog1
UNEXPANDED: - progcpy
prog2
UNEXPANDED: - progcpy
2. A COPYLIB is the one where, after compiling your programs, the copy of it is picked up by the CICS scrn.
...Regards |
|
| Back to top |
|
 |
Mayos
New User
Joined: 11 Apr 2005 Posts: 16
|
|
|
|
| Thank you so very much for your explanation. It is very helpful. I appreciate it. Many thanks. |
|
| Back to top |
|
 |
|
|