PH Cleanup Routines
Watt Peter (Van)
peter.watt@artioslink.com
Wed, 25 Feb 1998 16:25:35 -0800
Thank you Arthur, that is a usefull idea. However I was hoping someone
had already developed this tool to save us the development time. Also,
was the 'nawk' script intelligent enough to handle 'use' files? I
suppose coding the rules for that wouldn't be so difficult.
There have been a number of responses suggesting
* overnight searches for specific code strings
* using Power2000 - (Power2000 is a glorified if not very powerful and
expensive, search utility)
* cleanup as you go
All valid but unfortunately, very time consuming. We have 500+ quick
programs in our system. We are considering moving it to Axiant. We
would like to reduce the size of any Axiant application. We know we
have numerous code bits that are no longer used. We have recently
removed all programs considered obsolete (not called anywhere) and
removed obsolete compile switches.
What I would like is to have some method preferably at compile time, to
be able to list items in a screen, report, or batch update program that
are not referenced and therefore just taking up space. Sounds simple
and the question is posed, is it necessary? I am sure we are not going
to surprise anyone to say we have numerous quick programs that each have
thousands of lines of code. Does this not make following code more
difficult? How about re-use of temporaries or defines? Also,
regardless of whether a temporary item is used, it is still initialized
so what about the speed ramifications?
My little rant on the increasing amount of aging systems.
Peter Watt
peter.watt@artioslink.com
-----Original Message-----
From: powerh-l-owner@sphere.swau.edu
[SMTP:powerh-l-owner@sphere.swau.edu]
Sent: Wednesday, February 25, 1998 1:08 PM
To: Watt Peter (Van); Rohde Dirk (Van); Shaw Ronda (Van); Deppiesse
Brian (Van); 'powerh-l@lists.swau.edu'; 'Watt Peter (Van)'
Subject: RE: PH Cleanup Routines
Hi Peter,
while working for a University a few years ago, together with a
colleague we developed simple "nawk" scripts to do similar things, eg
one script would start at the top screen (the one and only entry point
into the application) and create an indexed file (later a relational
table) of which programs called which programs within the application,
another checked which temps were used in the screen (note this is more
difficult to do in QUIZ and QTP, because of things like "report all").
If you are one of those unlucky non UNIX sites (and do not have tools
like nawk or pearl), you can write very simple C (or much more
convoluted COBOL) programs to do the same thing.
This did allow us to clean up our code somewhat, especially deleting
programs that were not called from anywhere. However, this only went
part of the way. What I mean is, that just because a program is
referenced in the code, does not necessarily mean that it is used. The
way we got around this problem, was to create a fast single logging to a
sequential file from every program showing the date/time/user etc... As
the University has an annual cycle, we were able to identify dead
programs (along with other useful information) after a year of logging.
This has got rid of quite a bit more dead wood then the first approach.
Regards,
> Arthur Kogan COGNOS Customer Support
> e-mail: Arthur.Kogan@cognos.com
phone: 61-2-94376655 fax: 61-2-94381641
The difficult we do immediately,
the impossible takes a little longer.