PH Cleanup Routines

Kogan, Arthur Arthur.Kogan@cognos.com
Tue, 24 Feb 1998 21:55:42 -0500


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.



> ----------
> From:  Watt Peter (Van)[SMTP:peter.watt@artioslink.com]
> Sent:  Wednesday, February 25, 1998 12:31 PM
> To:  'powerh-l@lists.swau.edu'
> Subject:  PH Cleanup Routines
> 
> Not sure if this has made it on this list server so I will pose the
> question.
> 
> Does anyone know of, or developed some PH cleanup routines.  For
> example, something to identify which internal procedures, temps and
> defines that are no longer referenced in the PH code.  I think we are
> in
> the same boat as many other companies, that our source has continued
> to
> grow over the years without ever having an efficient way to cleanup
> the
> code.  Someone recently suggested to me a cross-reference utility,
> that
> would help.
> 
> My thoughts are that this would require some sort of pre-compiler that
> could be used to create the cross-reference document/utility.  Think
> Cognos would be willing to part with the compiler?  Didn't think so...
> 
> 
> So, has anybody been adventurous enough to try this?
> 
> Peter Watt
> peter.watt@artioslink.com
>