No need to have empty members -- an empty PDS does about as well.

There are things that an empty member would not catch. Suppose the program 
COPYed functional statements into the middle of some executable section. The 
code might well compile cleanly without them. Not typical, but possible.

In any event, your strategy misses the COPYs nested inside COPYs members. I 
forgot that part in my "what a bear" description. You have to chase the nested 
COPYs, and to do the best job, keep track of the ones you have already chased 
so you don't chase them again.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Friday, March 22, 2013 9:54 PM
To: [email protected]
Subject: Re: Parsing cobol code for copybooks

On Fri, 22 Mar 2013 12:07:50 -0500, Ron Thomas wrote:

>Hello. Could some one let us know how to create a process which extracts all 
>copybooks from a program and looks in to the copybook library and check  if it 
>exists ,  if exists  reads the copybook variables in the copybook and search 
>in the program and writes the lines  which uses the variable to a output file.
>
>Please let us know how we can acheive the same?
> 
I can't help thinking of the nuclear doomsday option:  Temporarily create a 
copybook library with each current member replaced by an empty file.  Compile 
your program.  Note what breaks.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to