GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-8
ADD^TRACE^DATA
is the entry type, which indicates the type of data to be copied. The values for type
are:
Except for these restrictions, use of this parameter is completely user-dependent.
Whatever value is assigned to type is passed through to the trace records. For
information on how to dynamically control the tracing of classes of user-defined
events, see “Dynamic Control of User-Coded Tracing” on page 2-80.
datai input
INT .EXT:ref
is a pointer containing an address where data copying should begin.
bytesi input
INT:value
is the length in bytes of the data to be copied starting at datai.
Consideration
Use the SCF HELP command to view trace option settings. For example,
-> HELP GDS TRACE PROCESS
Example
This example illustrates a user-defined trace call that tests the settings of the global
trace^control^flags array:
PROC USER^INITIALIZE(primary);
INT primary;
BEGIN
INT .MBUF;
INT ERR := 0;
IF SR^MISC^TRACE AND (@MBUF := GETLOCALPOOL(0,150)) THEN
BEGIN
IF NOT (ERR := USER^OPEN^TRACE^FILE(512,124,5000D)) THEN
BEGIN
IF primary THEN
MBUF ':=' "USER^INITIALIZE primary successful"
ELSE
MBUF ':=' "USER^INITIALIZE backup successful ";
CALL ADD^TRACE^DATA (SR^MISC^REQ,MBUF,34); !bytes
ERR := USER^CLOSE^TRACE^FILE;
END;
CALL PUTLOCALPOOL (0, MBUF);
END;
END;
0-127 Reserved for TSCODE events
128-255 Used for USCODE events