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 SIMULATE 2000. By default, PTLTRACE 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.
//PTLTRACE DD DUMMY
To enable the trace facility for a TSO userid, the following ALLOCATE command can be issued in a TSO environment. After allocating PTLTRACE, any SIMULATE 2000 language processing will produce trace messages. The TPUT SVC interface routine is used to send the messages to the TSO session.
ALLOCATE FILE(PTLTRACE) DUMMY
For batch jobs, the trace messages are written to the JES messages data set. When a user examines the job output, the trace messages will appear among the operating system allocation messages and step completion codes. Note: Trace messages will not appear on the console, or in the system log data set.
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 PTLTRACE 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 ...
//*
//* PORTAL 2000 INSTALLATION VERIFICATION JOB
//*
//IVP EXEC PGM=PTLIVP
//STEPLIB DD DISP=SHR,DSN=DTS.PTLR71.LOADLIB
//PTLTRACE DD DUMMY
//SYSPRINT DD SYSOUT=*