utility to trace program flow
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Problem Determination

#1: utility to trace program flow Author: MVS_blob PostPosted: Tue Mar 11, 2008 1:43 am
    —
Hi,

I'm currently employed by a banking corporation.

We've got a front end (web) based application that works as follows:

- log in web page with username
- IMS maps username to transactions, PSBs, DB..etc
- these transactions execute COBOL programs, that call other COBOL programs.

Is there a utility that, when given a username will trace an online program flow?

e.g. similar to option 3 (TRACE Program flow and program attributes) in abendaid.

PROGRAM1 -> program2 -> program3 -> program4

I i'm currently using a utility called Mainview that, when given a username will tell me the IMS psbs, transaction, and DBs the username executes during a transaction.

A program flow would help greatly during debugging.

any ideas would be greatly appreciated.

#2:  Author: maxd PostPosted: Mon Mar 17, 2008 9:41 am
    —
I don't think IMS has utility to trace program flow... Sad Sad Sad

#3:  Author: MVS_blob PostPosted: Tue Jul 22, 2008 11:59 pm
    —
so...looks like there isn't an existing utility to trace program flows.

Consider this...

As all COBOL programs are converted to assembler instructions, I've done some research, and found some simple facts:
- Register 14 is, by convention, used to provide the address for a called subroutine to return to the caller.
- Register 15 is, by convention, used to provide the entry point address of a
called subroutine and to provide the initial base register for the subroutine.

Also, when a program abends, LEAID is called which is able to track the calling history and produce a list of program names.


So...when a program is in execution, its program name is saved in memory somewhere (either in a register, or some system address)

Is it possible to write a program that runs in the background to monitor this area of memory containing the program name. It prints out any changes, and presto, a list of called programs for a transaction.

Let me know if i'm on track, or if yo have any other possible ideas on how to track executing programs.

Cheers!

#4:  Author: semigeezerLocation: Atlantis PostPosted: Wed Jul 23, 2008 2:59 am
    —
STROBE or APA will do this.

I don't kow about IMS environments, but at least in a standalone or TSO one you could write your own program which runs as a subtask in the same address space and monitors the various TCBs and save area chains but I've done that and found it to be less than reliable because it is difficult to get the monitoring task dispatched often enough to get a good set of samples. Better to go with the commercial products. They won't give a trace exactly, but they will give lots of data on where time is spent. They are meant for performance analysis (as was my tool) rather than tracing (although mine was implemented as part of a program trace tool).

There are also source level debuggers for many environments. Not sure if IMS is one of them though. Those are probably the best for learning how a program works.



MVSFORUMS.com -> Problem Determination


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group