Wait for a Specified Amount of Data to Accumulate
Describes how to wait for an amount of data to accumulate.
Your monitor execs can also wait to be posted by Db2 when sufficient data accumulates. In this method, you specify the address of an ECB that Db2 should post once it has collected a specified number of bytes of trace data. Once posted, your exec can issue a READA request to have
RLX
/IFI obtain the accumulated data and map it into REXX variables.The following example waits until Db2 collects 7 KB of trace data. Each time the exec resumes execution, it issues a READA request to obtain the accumulated trace data.
/* REXX */ address IFIwbufecb = GETMAIN(4)(1)wbufsize = 8(2)wbufbc = 7(3)dsn = '' /* Specify Db2 subsystem name */ plan = '' /* Specify RLX plan name */ "caf activate thread(:t1) system(:dsn) plan(:plan)"(4)"start trace (perfm) class(30) IFCID(65) dest(opx)",(5)"bufsize("wbufsize")" Do 5 post_code = wait(‘ECB’,wbufecb)(6)‘READA’(7)/* process returned buffer */(8)End "-stop trace(perfm) tno("ifcatnor")"(9)"caf remove thread(:t1)"(10)Return(11)
Notes:
(1)
(2)
RLX
/Software Development Kit. The GETMAIN function returns a 31-bit address of the storage that is just obtained into variable WBUFECB.
(3)
(4)
.
(5)
(6)
(7)
(8)
(9)
(10)
(11)