Operating System - OpenVMS
1748239 Members
3743 Online
108759 Solutions
New Discussion юеВ

Re: How to create a listing of called programs (nested tree)

 
John T. Farmer
Regular Advisor

How to create a listing of called programs (nested tree)

Anything available in freeware area that will produce a call-tree from an initial COBOL source file? For example:

PROGA.COB (program-id=PA)
|
|--> PROGB.COB (program-id=PROGRAM_B)
|
|--> PROGC.COB (program-id='test')
|--> PROGD.COB (program-id='test2)

I am hoping there is some sort of sourcecode parser available to generate data where I could query to find all programs that execute from a base program instead of manually editing, finding, documenting...

Thanks,

John
9 REPLIES 9
Robert Gezelter
Honored Contributor

Re: How to create a listing of called programs (nested tree)

John,

I always view source analysis tools with a degree of suspicion. That is not to say that they do not work. It is more a statement of the limitations of the technique.

The LINK/CROSS_REFERENCE produces a cross reference of what is actually in the image.

A cautionary note, if the LINKER cross reference shows calls to a shareable library that is connected at execution-time, there may be more than one set of sources extant with the same names.

- Bob Gezelter, http://www.rlgsc.com
Craig A Berry
Honored Contributor

Re: How to create a listing of called programs (nested tree)

ctags purportedly supports COBOL:

http://ctags.sourceforge.net/

and purportedly runs on VMS:

http://www.polarhome.com/ctags/

Never used it myself, but it looks promising. At first blush it looks as though the information you want is implicit in the TAGS files it generates but you'd need something else to actually draw the tree.
Dennis Handly
Acclaimed Contributor

Re: How to create a listing of called programs (nested tree)

Decades ago I used call graph tools that worked by analyzing object files, so they would work for any language.
Of course it wouldn't catch indirect or virtual calls or COBOL CALL identifier.
John T. Farmer
Regular Advisor

Re: How to create a listing of called programs (nested tree)

I will have a look at CTags. Trying to avoid a significant custom write.

Thanks,

John
Mike Kier
Valued Contributor

Re: How to create a listing of called programs (nested tree)

Its not freeware, but if you already have DECset then LSE/SCA can produce Call Tree graphs under the DECwindows interface.

I was always disappointed there wasn't a non-DECwindows report available for that feature.
Practice Random Acts of VMS Marketing
John Gillings
Honored Contributor

Re: How to create a listing of called programs (nested tree)

John,

If your programs are linked into shareable images, the attached procedure will draw a call dependence tree for referenced shareable images.

(rewritten to work on IA64 from a very old procedure. Should work on IA64 and Alpha. Won't work on VAX as it is, but possibly could with an extra labels added "StartVAX:" immediately above "StartAlpha:" and "gsmatch_VAX:" above "gsmatch_Alpha:". I don't have a running VAX to test it on).
A crucible of informative mistakes
kari salminen
Advisor

Re: How to create a listing of called programs (nested tree)


DECmigrate (AEST for Alpha and VEST for VAX) will create a flowgraph from
the executable file, even if don't have the sources available.


VEST

/FLOWGRAPH

Description

The flowgraph file contains information used by the FLOWGRAPH
command to create one or more PostScript(TM) formatted flowgraph
files. A flowgraph can be one of the following types:

o A call flowgraph that charts the image's calling structure and
includes the names of the called routines.

o An error flowgraph that charts the routines in the image that
incurred VEST error messages.

o A complete flowgraph that charts the program flow of the
entire image based on the code that VEST has found.

Use the /VIEW qualifier to select which of these three kinds
of flowgraphs to include in the flowgraph file and the /VIEW
qualifier keywords to select the kind of information to be
included within either an error or a complete flowgraph.


H.Becker
Honored Contributor

Re: How to create a listing of called programs (nested tree)

If your programs are linked into shareable images, you may want to get the SHIML program (for Alpha or I64 images).

SHIML usage

$ MC your_disk:[your_dir]SHIML [-u] full_image_file_spec
-u: unique, no duplicates in shareable image names

Examples

$ mc sys$disk:[]shiml xyz.exe
recursive SHareable IMage dependency List (Alpha), version 1.1
[ -> Translated Logical Name ] Required Match: ID [ / Actual match: ID ]
[ (self) - Self Reference; (dnf) - Duplicate, Not Followed ]

X -> SYS$DISK:[]X.EXE - MATALL: 1,1 / MATALL: 1,1
Y -> SYS$DISK:[]Y.EXE - MATALL: 1,1 / MATALL: 1,1
Z -> SYS$DISK:[]Z.EXE - MATALL: 1,1 / MATALL: 1,1
X - MATALL: 1,1 (dnf)
SYS$PUBLIC_VECTORS
SYS$PUBLIC_VECTORS (dnf)
SYS$PUBLIC_VECTORS (dnf)
DECC$SHR -> SYS$SHARE:DECC$SHR_EV56 - MATLEQ: 1,1 / MATLEQ: 1,1
LIBRTL - MATLEQ: 1,1 / MATLEQ: 1,1
SYS$PUBLIC_VECTORS (dnf)
CMA$TIS_SHR - MATLEQ: 1,4 / MATLEQ: 1,4
CMA$TIS_SHR (self)
LIBRTL - MATLEQ: 1,1 (dnf)
LIBOTS - MATLEQ: 1,3 / MATLEQ: 1,3
SYS$PUBLIC_VECTORS (dnf)
SYS$PUBLIC_VECTORS (dnf)
LIBOTS - MATLEQ: 1,3 (dnf)
DPML$SHR - MATLEQ: 1,0 / MATLEQ: 1,0
DPML$SHR (self)
LIBOTS - MATLEQ: 1,3 (dnf)
LIBRTL - MATLEQ: 1,1 (dnf)
CMA$TIS_SHR - MATLEQ: 1,4 (dnf)
SYS$PUBLIC_VECTORS (dnf)
SYS$PUBLIC_VECTORS (dnf)
SYS$PUBLIC_VECTORS (dnf)
$
John T. Farmer
Regular Advisor

Re: How to create a listing of called programs (nested tree)

Most are static linked programs. I have source, obj and exe available. Do not have DECSET. Since we had source code during move from VAX to Alpha, no VEST/AEST was required. We do not have much beyond standard VMS 8.3 install and COBOL compiler.

Thanks,

John