Contents
Program Entity Organizer

Silver Mountain Data Systems, Ltd. machy@ix.netcom.com

© 1997 Silver Mountain Data Systems, Ltd.  All rights reserved.

Table of Contents

•	Disclaimer Agreement

•	How to

•	Menu Selections

•	Register


PEO Description

The Program Entity Organizer (PEO) is a powerful yet simple, personal tool.  Requires MS Windows 3.1 and MS Windows recommended hardware resources.  PEO parses one or a hundred COBOL programs into primitive entities, then links the entities using Computer Associates' powerful Clipper data base.  When programmers are asked to change program code, no matter how small the change seems to be, the impacts  on the other parts of the system can be unrealized until the program is in production.  You can quickly trace the effects of any element on the rest of the program or system ("ripple effect").  PEO eliminates unwanted surprises following program modification.

PEO provides information regarding all relationships within a user defined set of COBOL programs, including all copy members and all CALLed modules.  For example, the user can select any entity from within the set of programs.  If the Entity is a data element, PEO will show a list of all elements that are related to that element through COBOL verbs.  Data modification relationships are shown by the   verbs MOVE, COMPUTE, READ etc., Control structures references are shown by the verbs IF, PERFORM, CASE etc.  The user can then select any of the portrayed entities as the new target and PEO will display all the entities related to the new target, thus providing a data flow through the program.

To use PEO, the COBOL source code is loaded onto a personal computer.  The names of all CALLed programs, copy members, and entry points are extracted.  The source is then expanded to include all of its components.  The PEO parser then extracts all the relationships that exist in the code.  This data is then made available to the user in an easy to use interactive format.

PEO was developed by a group of COBOL programmers with over 75 years of system integration experience.  PEO provides the programmer with on-line access to COBOL data and control relationships.  It saves programmer maintenance time and eliminates the errors inherent in manual tracking.  PEO was developed originally as a PC DOS application for standalone research on downloaded mainframe COBOL application programs and has proven to be especially good at untangling "spaghetti" code.

PEO:

•	1.  Finds hidden problems; e.g., those involved with group moves, group parameters, and aliases.

•	2.  Has a built-in editor to document your analysis.

•	3.  Automatically keeps track of the myriad paths you pursue through the program(s), so you can return to the starting point.

•	4.  Traces program CALLs to alternate entry points.

•	5.  Has many other powerful features.

You can have peace of mind knowing that every relevant part of a program has been examined.


Disclaimer Agreement

USERS OF PROGRAM ENTITY ORGANIZER (PEO) AND ITS SUPPORTING SOFTWARE, THROUGHOUT THIS DOCUMENT, REFERRED TO AS SEO, MUST ACCEPT THIS DISCLAIMER OF WARRANTY: PROGRAM ENTITY ORGANIZER (PEO) AND SEO ARE SUPPLIED AS IS.  THE AUTHOR AND PUBLISHER DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. THE AUTHOR AND PUBLISHER ASSUME NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL,WHICH MAY RESULT FROM THE USE OF PROGRAM ENTITY ORGANIZER (PEO) AND SEO.

Program Entity Organizer (PEO) and SEO are offered as 'shareware programs' and are provided at no charge to the user for evaluation.  Feel free to share it with your friends, but please do not give away all or any part of it altered or as part of another system.  The essence of  'user-supported' software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products.  If you find this product useful and find that you are using Program Entity Organizer (PEO) and SEO, and continue to use Program Entity Organizer (PEO) and SEO after a reasonable trial period, you must register.


How to

•	Get Started

•	Parse Data

•	View Data

•	Restart

•	View Program Structure

•	View Call Hierarchy

•	Filter Data Names

•	View Messages


Get Started
How to Get Started

The first step is to define a set of COBOL programs as a project.  A project can contain a single program or a group of programs.  Normally, a project is defined for each set of COBOL programs that provide a major system function.  Each project automatically creates a subdirectory of the PEO working directory, (usually called WINMACHY). The project's name is used as the sub directory  name.  The complete path to a project's subdirectory is required for all other menu items. All output from a menu option is written to the project's subdirectory (except, as noted in the FILE.OPENGROUP option).


Parse Data
How to Parse Data

Parsing is the extraction of all data and structure relationships from the COBOL programs.  Before COBOL programs can be parsed, they must be assigned to a project, (See Get Started).  After the COBOL programs have been assigned to a project, they can be processed individually (See FILE.OPEN); they can be processed all at one time (See FILE.OPENALL); or groups of programs within the project can be processed together (See FILE.OPENGROUP).   Once a program or set of programs has been parsed, they do not require parsing again until the programs have been modified. Parsing creates the view files required by VIEW.NEW. PEO has a parsing limit of one million lines.


View Data
How to View Data

Before program data can be viewed, the program data must be extracted and prepared, (See PARSE DATA).  You must first have PEO load its data bases with the extracted program data, (See VIEW.NEW). "View.New" requires you to name the path to the COBOL program's view files. The path is usually the project's subdirectory of the PEO working directory, (usually called WINMACHY). The view file name is normally the COBOL program name except when you load grouped COBOL programs. Grouped COBOL program data is stored in the GROUP subdirectory of the special directory you must create to use the FILE.OPENGROUPoption. The view file name will be the project name.

After the extracted data is loaded, use VIEW.OPEN to start the interactive display of program data. Select the program *.rel file you wish to view.  PEO has easy to use commands that are documented on the screens. Take note of the PF-2 accelerator key.  It keeps your place and makes it easy to backtrack along the myriad paths of logic and data transformations. Keep notes with the capture editor. Don't hesitate to select new targets entities using the cursor and enter keys. PF-2 lets you return to where you were.


Restart
How to Restart

Restarting a task is easy. You can restart PROJECT.NEW, PROJECT.OPEN, FILE.OPENALL, and FILE.OPENGROUP by simply repeating the steps required to initiate the options. The processing will restart with the COBOL program following the last completed program. The FILE.OPEN option will always restart at the beginning of the selected program. You can force a restart at the beginning by:

•	1. Deleting the .rs2 file in the GROUP subdirectory of the temporary directory created for the selected COBOL programs (See FILE.OPENGROUP).

•	2. Deleting the .rs2 file in the project subdirectory of PEO's working directory, WINMACHY (See FILE.OPENALL).

•	3. Deleting the .rs1 file in the project subdirectory of PEO's working directory, WINMACHY (See PROJECT.NEW and PROJECT.OPEN).


View Structure
How to View Structure

The PEO parser automatically creates a "shadow" set of program paragraph names.  This set is distinguished by an underline "_" prefix.  When one of these names is selected for viewing, the resulting display is restricted to only paragraph names.  This provides a view of the program structure.


View Call Hierarchy
How to View Call Hierarchy

When you choose one of the File options (parse) to create view files,  you will also get a text file showing the hierarchy of CALLs to subprograms.  The file is named after the program or project selected and will have .hih as the file extension. The file will be in the project subdirectory of WINMACHY; or, in the GROUP subdirectory of thespecial directory you created for the FILE.OPENGROUP option.(See FILE.OPENGROUP)


Filter Data Names
How to Filter Data Names

When you choose one of the File options to create view files you can also get a text file showing the data element names that contain text strings you specify.  To specify the text strings you must create an ASCII text file named, 'seofiltr.fil'.  The file must be in the project subdirectory of PEO'sworking directory, WINMACHY.  Each text string must be on a separate line. The data element names containing the text strings are written to another text file. The file is named after the program or project selected and will have .dte as the file extension.  The file will be in the project subdirectory of PEO's working directory, WINMACHY; or, in the GROUP subdirectory of the special directory you created for the FILE.OPENGROUP option. (See FILE.OPENGROUP)


View Messages
How to View Messages

When you choose one of the File options to create view files you should check the messages file.  The file is named after the program selected and will have seo as the file extension.  The file will be in the project or GROUP subdirectory. The messages file contains information about the creation of the view file; e.g., missing copy books, missing subprograms, and unknown data element names.  If there are too many messages it will affect the value of the view file. The file will be in the project subdirectory of WINMACHY; or, in the GROUP subdirectory of the special directory you created for the FILE.OPENGROUP option. (See FILE.OPENGROUP)


Menu Selections

•	FILE.OPEN

•	FILE.OPENALL

•	FILE.OPENGROUP

•	FILE.EXIT

•	PROJECT.NEW

•	PROJECT.OPEN

•	VIEW.NEW

•	VIEW.OPEN


OPEN
FILE OPEN

Extracts relationship data from a single standalone COBOL program.  After creating the project, (See PROJECT.NEW), select FILE.OPEN and provide the following information:

•	1. The path to the project's sub directory of PEO's working directory.

•	2. The path to the COBOL source file.

•	3. The path to the copybooks.

The relationship data will be extracted for the named program and stored in the project's subdirectory of PEO's working directory, WINMACHY.


OPENALL
FILE OPENALL

Extract relationship data from all standalone COBOL programs in the COBOL source code directory in batch mode.  This option is the same as FILE.OPEN except all standalone COBOL programs are parsed and prepared for viewing as individual view files.  Select FILE.OPENALL and provide the following information:

•	1. The path to the project's subdirectory of PEO's working directory.

•	2. The path to the COBOL source files.

•	3. The path to the copybooks.

The relationship data will be extracted and stored as individual view files in the project's subdirectory of PEO's working directory, WINMACHY.


OPENGROUP
FILE OPENGROUP

Join standalone COBOL programs (from the same project) for viewing.  You must create a directory for the selected COBOL programs and copy the programs' source code to the new directory.   DO NOT copy CALLed subprograms to the new directory.  You do NOT have to create a project for the selected COBOL programs.   Select FILE.OPENGROUP and provide the following:

•	1. The path to the selected COBOL programs' original project directory.

•	2. The path to the selected COBOL programs' original source code directory, CALLed subprograms should be in this directory.

•	3. The path to the copy books.

•	4. The path to the new directory you created for the selected COBOL programs.

The original project name will be used to name the files created for View.  The View files will be written to the GROUP subdirectory of the directory you created; use this path to reference the joined programs when you choose VIEW.NEW and VIEW.OPEN.   You do not have to create the GROUP subdirectory.


EXIT
FILE EXIT

This option allows you to exit the program.


NEW
PROJECT NEW

You must choose this option at least once for each directory of COBOL programs.  This must be done before programs can be prepared for viewing.  You will be asked to provide the following information:

•	1. A one-to-eight byte project name.

•	2. The path to the COBOL directory.

•	3. The path to the copybooks.

The project name will be used to created a subdirectory of PEO's working directory, usually called WINMACHY.  The path to this directory will be required for all other options.


OPEN
PROJECT OPEN

If you add COBOL programs to a directory you must select this option to include the new programs in the project.  You will be asked to provide the following information:

•	1. The path to the project's sub-directory of PEO's working directory.

•	2. The path to the COBOL source code.

•	3. the path to the copybooks.


NEW
VIEW NEW

Use this option to load view files into PEO's data bases.  You must provide the path to the project directory. The project is usually a subdirectory of the PEO working directory, WINMACHY. The name of the view file will be the COBOL name with a prc extension. The exception is when you intend to load files for grouped COBOL programs. In that case, the name of the view file will be the project name with a prc extension; and, the view files will be in the GROUP subdirectory of the special directory created for the grouped programs (See FILE.OPENGROUP).


OPEN
VIEW OPEN

Use this option to view your COBOL programs. Choose the project subdirectory that contains the program's view files. You will be presented with a list of *.rel files. Choose the one you wish to view. The project is usually a subdirectory of the PEO working directory, WINMACHY.  The name of the view file will be the COBOL name. The exception is when you intend to view files for grouped COBOL programs. In that case, the name of the view file will be the project name with a .REL extension; and, the view files will be in the GROUP subdirectory of the special directory created for the grouped programs (See FILE.OPENGROUP).

Once the screens come up just follow the instructions on the screens.


Register
How to Register

Please send $40.00 US (no cash, please) to:

Silver Mountain Data Systems, Ltd.

12008 West 87th Street, Suite 287

Lenexa, KS 66215

Thank you, If you find PEO helpful please take the time to register.