Browse Prior Art Database

DOBAR XEDIT/EXEC Macro Tools for Analyzing Program DO Groups

IP.com Disclosure Number: IPCOM000111908D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 4 page(s) / 98K

Publishing Venue

IBM

Related People

Comp, CM: AUTHOR

Abstract

Disclosed is a method for displaying source code while interactively selecting specific program DO groups for exclusion from the display. This method allows for global selection of DO groups or a particular DO group.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

DOBAR XEDIT/EXEC Macro Tools for Analyzing Program DO Groups

      Disclosed is a method for displaying source code while
interactively selecting specific program DO groups for exclusion from
the display.  This method allows for global selection of DO groups or
a particular DO group.

      This method utilizes EXEC and XEDIT macros tools on the VM
system to implement the required operations.  The operations are
divided up into three programs called DOBAR EXEC, DOBAR XEDIT, and Z
XEDIT.  The task of these programs is to display a program's source
code in a more readable fashion by excluding and thus condensing
selected DO groups from the display.

      The EXEC program called DOBAR is executed first.  It's job is
to read the source code input and to search through and identify the
DO groups by scanning for the keywords DO and END( which are not in
comments or string constants).  The EXEC keeps track of the level
(depth of embedded DO) for each statement in the source.  Every time
a DO statement is found the level is incremented.  The EXEC marks
every line after the DO statement line up until the line before the
corresponding END statement with this new level.  If an embedded DO
was found then the level would again be incremented and embedded
statements would be given the higher level.  Once an END is
discovered the level is decremented by one and this END statement and
subsequent statements would be assigned the new lower number.
Therefore the DO and END statement for this group would be assigned
the same level.

      When the complete source is scanned and the final level number
is not 1 then too many or not enough ENDs have be found and an error
message is displayed.  Next the EXEC creates a temporary data set
where each line would be created from the concatenation of the
statement's level number, a number of vertical bars, and the original
source statement.  The number of vertical bars on each line would be
equal to the level.  The EXEC would then call in XEDIT editor to
display this temporary data set.

      The XEDIT editor can now be used to browse the temporary data
set and observe the DO levels of the original source code.  The
example shown below contains the display of the source code before
and after DOBAR EXEC.

 ...