Measure Reference Manual
(Measure G11 and later PVUs) is the appropriate template version literal from MEASDDLS for
the entity type requested in entitydesc if you want ZMS style external records. If omitted or
passed as 0F, legacy style records are returned.
If passed as -1F, the templateversion for the current release will be used, starting with the
H06.15/J06.04 RVUs. Note that returned external records, in this case, may not match the
counter record definitions with which the application was compiled.
Usage Notes
• MEASREADACTIVE supports buffer sizes up to 32 KB only for active measurement of entities.
For buffers larger than 32 KB, use MEAS_READACTIVE_ (page 427).
• In Measure H01 and later PVUs, MEASREADACTIVE and MEAS_READACTIVE_ accept
DISKFILE, FILE, or SQLSTMT entity descriptors for ANSI SQL objects or partitions.
MEAS_READACTIVE_
Reads data from a currently active counter in Measure G09 and later PVUs. Before reading a
counter, you must obtain a valid measurement number (generally, by using the MEASMONSTATUS
procedure).
The MEAS_READACTIVE_ procedure cannot read DISCOPEN or PROCESSH counters. To access
these counter values, use the MEASREAD_DIFF_ procedure to read from the currently active
measurement data file. The collection interval specified for the measurement determines how recently
the counter values were written to the data file.
error := MEAS_READACTIVE_ ( meascb ! i,o
,measnum ! i
,entitydesc ! i
,loc ! o
,bufsize ! i
,bytesret ! o
,[ entity^index ] ! i,o
,[ templateversion ] ); ! i
error
INT
is the error code indicating the outcome of the operation. Possible error codes include:
DescriptionError Code
Successful completion.0
The counter records returned exceeded the buffer size.err^buftoosmall3204
The value of entity^index and the contents of entity^desc do not
match.
errm^cannotaccess3402
The value of entity^index and the contents of entity^desc do not
match.
errm^notmeasuring3404
meascb
input, output
INT:ref:$LEN(MEASCB^DEF) / 2
is a control block where the Measure subsystem stores data for subsequent procedure calls.
Before calling the first Measure procedure that uses meascb, you must allocate space in your
global data area for the control block and initialize each element of the control block to -1.
After you pass meascb to a Measure procedure, do not modify its contents.
The file $SYSTEM.SYSnn.MEASDECS contains the structure definition for the control block
descriptor (MEASCB^DEF).
MEAS_READACTIVE_ 427