Endevor

 View Only
Expand all | Collapse all

How Would You Find Abandoned COPYBOOKS?

  • 1.  How Would You Find Abandoned COPYBOOKS?

    Posted Mar 13, 2019 10:57 AM

    I'm at a site that has a MASSIVE library of copybooks and it occurs to me.... Are they all being used? I can do "where-used" queries, and "uses" queries... but how would you tackle finding "not-used" queries...? 

     

    Discuss...  



  • 2.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 13, 2019 11:08 AM

    Are the copybooks managed by Endevor?



  • 3.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 13, 2019 01:19 PM

    Yes....



  • 4.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 14, 2019 08:58 PM

    We need never used, no such comment, etc. query. I will vote for that idea, I know I would be executing that if we had it.



  • 5.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 15, 2019 03:19 PM

    What Emlyn said.



  • 6.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 15, 2019 12:42 PM

    Hi John, We've written our own utility for this. Nothing complicated...
    1. List all copybooks
    2. ACMQ for all copybooks
    3. REXX to review the ACMQ output and build DELETE SCL if a copybook is not used



  • 7.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 18, 2019 05:27 PM

    How do you know for sure there is no ACMQ data missing? If you are sure it's complete, I like Emlyn's process but would add Archive from Prod before Delete.



  • 8.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 20, 2019 11:47 AM

    We certainly don't have all the ACMQ data but we have the vast majority of it. Any deletions from out production stage are automatically transferred to our archive environment. As archive is an Endevor environment it's easy for developers to recover any copybook if they find that it is needed.



  • 9.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Apr 08, 2019 01:03 PM

    What Emlyn said... I havent made it to copybooks yet, but I have done the above for inventory areas (sys/subs/types/procgrps).  We currently ahve many applications cleaning up their stuff, so I dont know that I woudl take on the sole repsonsibility of deciding which copybooks are good and which arent.  For now I'd be happy if they woudl just clean out the ancient stuff in the lower stages.



  • 10.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Apr 08, 2019 04:51 PM

    The process in How to create ACM information without generating comes pretty close to identifying unused copybooks. See https://communities.ca.com/thread/241737601 . That process does not depend on existing ACM information, but rather it scans source code to find copybook references. After making a list of existing copybook elements it matches the list with the names of copybooks found from the scan.  With a little work on the provided REXX, it can identify the existing copybook elements that are not referenced by any program.  



  • 11.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Mar 25, 2019 09:12 AM

    Before the COPYBOOKS are archived, copy them into a special copybook library.  This copybook library can be added to the processor as the last copybook library in the concatination, make sure to monitor components.  You can then look to see if the COPYBOOKs were pulled in from the special COPYBOOK library via component list information or ACMQ.  This can help to determine what COPYBOOKs can possibly be archived.  Before doing this, I would work to cleanup the appropriate COPYBOOKs in pre-production stages.



  • 12.  Re: How Would You Find Abandoned COPYBOOKS?

    Posted Apr 09, 2019 03:35 PM

    Turns out the answer is actually doing an ACMQ Batch query on where-used! It seems that if I wildcard everything (except TYPE... I want to control TYPE.... and STAGE as well...) and do a BATCH query, ACMQ actually appears to use the Element Catalog to fetch the name of every element that matches the criteria and then provides the report indicating # ELM USING the the ELEMENT ACTION SUMMARY REPORT. All you have to do is look for a value of "0" in that column.

     

    Huh. Who knew? 

     

    So now it depends on the veracity of the data in your ACM!