If a rule is not performing as intended, the language tracing facility
can be very helpful in determining the problem. When a special DD
statement is found allocated to a job or TSO user, the product will display
messages when performing the compare operations in the rules language. The
DEFPROD statement defines the special DD names used by SCC
Monitor. By default, MONTRACE is the special DD name used by the
trace facility. Adding the following DD statement to a job step will
enable the rules language trace facility for the step.
//MONTRACE DD DUMMY
To enable the trace facility for a TSO userid, the following ALLOCATE
command can be issued in a TSO environment. After allocating MONTRACE, any
SCC Monitor/Realtime language processing will produce trace messages. The
TPUT SVC interface routine is used to send the messages to the TSO session.
ALLOCATE FILE(MONTRACE) DUMMY
When the language tracing facility has been enabled, the product will
write a message whenever an IF-THEN-ELSE group is entered. The message will
display the name of the DEFRULE containing the IF-THEN-ELSE
group, and the number of the group within the rule.
During compare processing, the trace facility will display the name and value of the
symbolic fields being compared. If an expression uses literal fields, the message will display
LITERAL for the name of the data. The relational operator will also be
displayed in the trace message.
After processing the expressions in an IF-THEN-ELSE group, the trace
facility will display a SUCCESS or FAIL message. If the
IF-THEN-ELSE group is successful and the CONTINUE SCAN was
requested by the group, this message will also display the name of the next rule.
In the following example, the MONTRACE DD statement has been added to a
test job. This DD statement will enable the trace facility. Trace
messages will be written to the JES messages data set.
//JOBNAME JOB ...
//TEST EXEC PGM=IEFBR14
//MONTRACE DD DUMMY
//DD1 DD DSN=PROD.TESTACC.FILE,
// SPACE=(TRK,(1)),
// DISP=(NEW,CATLG),UNIT=SYSALLDA,
// VOL=SER=WORK01
MONTRACE DD trace facility can
produce a lot of trace messages. To limit the number of messages, you can use the selective
trace facility. To activate selective tracing, specify the TRACE(SELECTIVE)
operand on the DEFPROD statement and use the TRACE
parameter on each DEFRULE statement that you wish to trace. Note:
The //MONTRACE DD DUMMY statement is still required to activate tracing.
DEFPROD TRACE(SELECTIVE)
DEFRULE RULE01 TRACE
...
DEFRULE RULE02
...
DEFRULE RULE03 TRACE
...
Tracing during pool build
During rules conversion, the compiler evaluates the pool definitions to build the
associated UCB lists. The TRACE(COMPILE) operand on the
DEFPROD statement enables an internal trace facility for the pool build
process. When the compiler evaluates an expression used in a pool definition, trace messages
will be written to DIF’s message log for SCC
Monitor/Realtime, or the SYSPRINT DD statement for
snapshot monitoring.
The DIFPOOL command can be used to display the devices that the compiler
selected for the pool definition. For more information, examine the
RTRACE command, which can also be used to trace rules processing on
jobs or started tasks—no JCL or rule changes are required. The command was designed
primarily for rule traces on started tasks: HSM, CICS,
IMS, etc. A DDname or dataset name filter can
also be specified on the command. Like the normal DD trace request, the output from a rules
trace is written to the JES messages file for the job. For more information and sample
command usage, examine RTRACE in the SCC Product
Installation Guide (see page 5-44 and page 6-3).
Command to trace started tasks
The DIF RTRACE command can also be used to trace rules processing on jobs
or started tasks—no JCL or rule changes are required. The command was designed primarily for
rule traces on started tasks: HSM, CICS,
IMS, etc. A DDname or dataset name filter can
also be specified on the command. Like the normal DD trace request, the output from a rules
trace is written to the JES messages file for the job. For more information and sample
command usage, examine RTRACE in the SCC Product
Installation Guide.