GDSX Manual
Design and Development
Extended General Device Support (GDSX) Manual–134303
2-79
User-Coded Trace Calls
Dynamic Control of User-Coded Tracing
If you want to dynamically control the tracing of classes of these user-defined events, 
you need to group the events into the classes to be controlled, and then assign trace 
record type values to the events so that the events fall into the desired classes. 
For example, two user-defined events can be assigned type as equal to 200 and 201 so 
that they fall within the trace class defined by the SCF keyword SRMISC (see 
Table 2-5). You can then turn on and off the tracing of these two events by setting and 
resetting the SCF trace class keyword SRMISC, which is equivalent to 
SR^MISC^TRACE (see Table 2-7).
A simple form of the trace call used for event type 200 is:
IF SR^MISC^TRACE THEN 
 CALL ADD^TRACE^DATA (SR^MISC^REQ, MYBUF1,100, MYBUF2,10);
A simple form of the trace call used for event type 201 is:
IF SR^MISC^TRACE THEN 
 CALL ADD^TRACE^DATA (SR^MISC^RSP, MYBUF1,100, MYBUF2,10);
Table 2-5 shows which type values fall into the standard SCF trace classes for USCODE 
events. The first column of the table contains the keywords used in SCF to select the 
classes of events to be traced. The far right column contains a description of the events 
for those entry types traced in the USAMPLE example program. However, you can 
assign type values to events in a completely different way from the correspondence 
shown for USAMPLE.
Table 2-5. USCODE Trace Classes and Entry Types (page 1 of 2)
SCF Trace 
Class Keyword
Literal Name for 
Entry Type
Literal 
Value
Events Traced by USAMPLE 
Example Program
TERMREQ TERM^REQ^IN 128 $RECEIVE request received by 
DEVICE^HANDLER 
TERM^REQ^OUT 129 Reply returned by 
DEVICE^HANDLER to external 
process
None 130-135 None
TERMDATA TERM^DATA^IN 136 Data input to 
DEVICE^HANDLER from non-
$RECEIVE file
TERM^DATA^OUT 137 Data output from 
DEVICE^HANDLER to non-
$RECEIVE file
None 138-143 None
TERMINTL TERM^STATE^CTRL 144 Determination of state by 
DEVICE^HANDLER 
TERM^ACTION^CTRL 145 Determination of action to be 
taken by DEVICE^HANDLER 










