[comp.software-eng] COBOL control flow analysis

wtwolfe@hubcap.clemson.edu (Bill Wolfe) (11/12/89)

> Date: Fri, 10 Nov 89 22:17:03 MST
> From: orville@lu.eas.asu.edu (Dr. Orville Weyrich)
> Dear Bill:
> Would you please be kind enough to post the following to usenet for me?
> Thanks in advance,
> Orville R. Weyrich, Jr.

Subject: COBOL Poisons and Antidotes/Control Flow Nasties

I have the dubious fortune of having to come up to speed quickly in COBOL
for the purpose of producing software tools for COBOL, and have several
questions to ask of the net.

1) A number of years ago there appeared an article by Brian T. Smith
   entitled "FORTRAN Poisons and Antidotes", which appeared in a Lecture Notes
   in Computer Science volume entitled "Portability of Numerical Software".
   This article/book discussed nasty things that could be done when coding
   FORTRAN and how to avoid/deal with them. CAN ANYONE RECOMMEND BOOKS/
   ARTICLES OF A SIMILAR NATURE PERTAINING TO COBOL?

2) I need to analyze the control flow of COBOL programs (especially old
   unstructured code).  This analysis is made difficult by COBOL's weak
   definition of the boundaries of a procedure which allow things like 
   branching out of a procedure before the end specified in the 
   PERFORM THRU, thus leaving an active return pointer to be blundered into
   during some other execution of the code segment.  Also many old COBOL
   programs seem to havrecursive calls in them (which work due to the
   ingenuity of long forgotten debuggers in kludging fixes). CAN ANYONE
   RECOMMEND BOOKS/ARTICLES PERTAINING TO DETECTING/HANDLING/RESTRUCTURING
   THESE SORTS OF ANOMALIES? Good graph-theoretical treatments of the subject
   are most welcome.

PLEASE EITHER POST RESPONSES TO COMP.LANG.MISC OR E-MAIL TO ONE OF THE
FOLLOWING ADDRESSES:   weyrich@csun1.cs.uga.edu
                       orville@lu.eas.asu.edu

I WILL SUMMARIZE TO COMP.LANG.MISC.

PLEASE DO NOT LET THIS DEGENERATE INTO A DISCUSSION OF WHY COBOL IS
GOOD/BAD OR WHY I SHOULD USE Ada OR C OR ....

nam2254@dsacg2.UUCP (Tom Ohmer) (11/17/89)

In article <7011@hubcap.clemson.edu>, wtwolfe@hubcap.clemson.edu (Bill Wolfe) writes:
> 
> > From: orville@lu.eas.asu.edu (Dr. Orville Weyrich)
> > Orville R. Weyrich, Jr.
> 
> Subject: COBOL Poisons and Antidotes/Control Flow Nasties
> 
> 2) I need to analyze the control flow of COBOL programs (especially old
>    unstructured code).  This analysis is made difficult by COBOL's weak
>    definition of the boundaries of a procedure which allow things like 
>    branching out of a procedure before the end specified in the 
>    PERFORM THRU, thus leaving an active return pointer to be blundered into
>    during some other execution of the code segment.  Also many old COBOL
>    programs seem to havrecursive calls in them (which work due to the
>    ingenuity of long forgotten debuggers in kludging fixes). CAN ANYONE
>    RECOMMEND BOOKS/ARTICLES PERTAINING TO DETECTING/HANDLING/RESTRUCTURING
>    THESE SORTS OF ANOMALIES? Good graph-theoretical treatments of the subject
>    are most welcome.

SIZE 3X Disclaimer in use.

I am aware of a product called RECODER that gives the following reports
on a COBOL program:

1. Warnings Report
2. Genealogy of Names Report
3. Dead Code Report
4. Structure Chart
5. Modularity Report

RECODER does Input Program Preparation, Structuring Process, Option
Dependent Code Customization, and Structured Output Generation.

RECODER is by Language Technology, Inc
	      27 Congress Street
	      Salem, MA  01970

For the record, this is a rumor.  Off the record, you might want to check
it out.
-- 
Tom Ohmer @ Defense Logistics Agency Systems Automation Center,
            DSAC-AMB, Bldg. 27-6, P.O. Box 1605, Columbus, OH  43216-5002
UUCP: ...{seismo!osu-cis}!dsacg2!tohmer   INTERNET: tohmer@dsacg2.dla.mil
Phone: (614) 238-9210   AUTOVON:  850-9210   Disclaimer claimed