Page 1 of 1

Where do the copybook "comes from" while execution?

Posted: Sun Jun 23, 2013 4:33 pm
by AD991
Hi,

If one particular copybook exists in multiple-libraries. Can anybody tell me how to know the copybook invoked by PGM is coming from which libraries when the program is compiled?

Re: Where do the copybook "comes from" while execution?

Posted: Sat Jun 29, 2013 5:25 pm
by Anuj Dhawan
If there's more than one libraries and they're concatenated you'll have to search each library in the concatenation. Depending on your shop set-up your particular compile may give you some insight into which lib in the concatenation might contain the copybook. There is no magic about it.

Also, in a standard COBOL compile the copybook lib(s) are pointed to by the SYSLIB DD in the compile step JCL - so you can start from there too.

Re: Where do the copybook "comes from" while execution?

Posted: Sun Jun 30, 2013 5:21 pm
by Anuj Dhawan
I'm not sure if I've answered your question the way you needed but I was skeptical about your question so came back to know, if it helps...

Re: Where do the copybook "comes from" while execution?

Posted: Mon Jul 01, 2013 7:41 pm
by Robert Sample
Concatenation works the same for load libraries as well as copy books and source code ... the libraries are searched in the sequence they are specified in the JCL, and the first data set that contains the member has that member used. There may be additional data sets that contain the member below that in the concatenation sequence, but they will not be searched since the search ends once the member is located.

Re: Where do the copybook "comes from" while execution?

Posted: Fri Jul 05, 2013 3:24 pm
by BobThomas
Can copybook be searched in Link-List or is it applicable to programs only? Please help.

Re: Where do the copybook "comes from" while execution?

Posted: Fri Jul 05, 2013 3:35 pm
by Robert Sample
Link list applies only to load libraries. Hence copy books cannot be stored in the link list.

Re: Where do the copybook "comes from" while execution?

Posted: Sat Jul 13, 2013 1:32 pm
by AD991
Thanks Anuj and Robert.

Re: Where do the copybook "comes from" while execution?

Posted: Mon Sep 23, 2013 10:19 am
by BobThomas
Robert Sample wrote:Link list applies only to load libraries. Hence copy books cannot be stored in the link list.
Okay, Thanks.