View previous topic :: View next topic
|
Author |
Message |
devonline
New User
Joined: 14 Jun 2005 Posts: 2
|
|
|
|
Hi Friends,
Can anyone tell me what does a copy book exactly does and how is it used? |
|
Back to top |
|
|
Sangita
New User
Joined: 02 Jun 2005 Posts: 17
|
|
|
|
Hi devonline,
In most of the big applications , there are large no. of programs
and maximum of them use a particular record structures and routines such as date validation routines are generally used by several programs.In such cases its important to ensure that each program has the same file description, record structure or code. And maintaining several copies of the same thing leads to errors and also time consuming.
Each time you modify one copy , you also modify all tha other copies. So to avoid all these we use COPYBOOK. The COPY statement inserts the copybook from the copylibrary into the source program during compilation.
e.g. COPY copybook-name OF/IN copy library-name
REPLACING identifier-1 BY identifire-2
1. COPY STUDREC.
2. COPY STUDREC REPLACING ALL "XX" BY "YY".
Regards,
Sangita |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi devonline,
Copy Book Usage is to reduce the Redundancy of the similar declaritons/structure/etc.,
As Sangita use the Copy <copybookname> to include that copybook into your program while compilation. |
|
Back to top |
|
|
|