How to know the number of records accessed by a program in Progress-4GL?

openedge, progress-4gl, progress-db

Solution

What version of Progress?

Somewhere around 10.1C _UserTableStat was introduced. It has table stats by user.

There are also the "client statement cache" fields in the _connect VST. If the proper bits are enabled for a session then a stack trace is saved so that you can determine what line a session is executing and how it got there.

Between them they may allow you to get what you need.

BTW: ProTop shows you much of this data -- https://protop.com/

You might also want to look at some of the "log-entry-types" features like 4gltrace and QryInfo if you need fine grained program by program stats.

Problem

I'm trying to know how many records a running program is accessing. I found the VST _TableStat, but it doesn't group the number of records by program. ``` FOR EACH _TableStat NO-LOCK WHERE _TableStat._TableStat-Create > 0 OR _TableStat._TableStat-Delete > 0 OR _TableStat._TableStat-Read > 0 OR _TableStat._TableStat-Update > 0, FIRST _File NO-LOCK WHERE _File._File-Number = _TableStat._TableStat-Id: DISPLAY /*_File._File-Name*/ _TableStat-Create _TableStat._TableStat-Delete _TableStat._TableStat-Read _TableStat._TableStat-Update WITH SIDE-LABELS 1 COLUMN 1 DOWN. END. ``` This code shows me the tables and how many records are being accessed, but I want to know the program wich is accessing the table. Is there a way to know this? Or is there a table like _TableStat with a PID or something like that? Ps.: I'm using Progress 10.2B. Thanks in advance, Rubinho Santos

Original source