Posted: Tue Mar 11, 2008 1:43 am Post subject: utility to trace program flow
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.
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.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Wed Jul 23, 2008 2:59 am Post subject:
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. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum