MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

utility to trace program flow

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination
View previous topic :: View next topic  
Author Message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue Mar 11, 2008 1:43 am    Post subject: utility to trace program flow Reply with quote

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.
Back to top
View user's profile Send private message
maxd
Beginner


Joined: 23 Jan 2007
Posts: 2
Topics: 0

PostPosted: Mon Mar 17, 2008 9:41 am    Post subject: Reply with quote

I don't think IMS has utility to trace program flow... Sad Sad Sad
Back to top
View user's profile Send private message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue Jul 22, 2008 11:59 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Jul 23, 2008 2:59 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group