EASY/Exit rules should be developed in an incremental manner. Do not attempt to implement all your installation rules at one time. Until you are familiar with the rules language, work on one rule group at a time.
Any new rule should be enabled only for rule verification jobs. By
specifying the TEST parameter on the rule definition,
typical rule processing will skip the new rule.
Rule verification jobs that allocate the EXTTEST DD
statement can enable the rule for the test job.
For example, the following rule would limit the application of the
PRDPERM rule to only jobs or TSO users that have an
EXTTEST DD statement allocated. Once the rule is
performing as designed, remove the TEST parameter and
perform an F DIF,REFRESH EXT console command.
DEFRULE PRDPERM TEST IF &HLQ = PROD
THEN SET DISKPOOL=PRDPOOL
DEFPOOL
PRDPOOL VOLSER=(PROD*,PRDT01,PRDT03,PRDT04,PRDT10)
If a rule is not performing as intended, the trace
facility can help determine 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
EASY/Exit. By default, EXTTRACE 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:
//EXTTRACE DD DUMMY
To enable the trace facility for a TSO userid, the following ALLOCATE
command can be issued in a TSO environment. After allocating
EXTTRACE, any EASY/Exit language
processing will produce trace messages. The TPUT SVC
interface routine is used to send the messages to the TSO session.
ALLOCATE FILE(EXTTRACE) DUMMY
When the trace 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
EXTTRACE 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
//EXTTRACE DD DUMMY
//DD1 DD DSN=PROD.TESTACC.FILE,
// SPACE=(TRK,(1)),
// DISP=(NEW,CATLG),UNIT=SYSALLDA,
// VOL=SER=WORK01
Selective Language Tracing Facility
EXTTRACE DD trace facility can
produce a large number of trace messages. To limit the number of
messages, use selective tracing as described below. To activate selective tracing, specify the
TRACE(SELECTIVE) operand on the
DEFPROD statement and use the TRACE
parameter on each DEFRULE statement that you want to
trace.
EXTTRACE DD DUMMY statement is still required
to activate tracing.
DEFPROD TRACE(SELECTIVE)
DEFRULE RULE01 TRACE
...
DEFRULE RULE02
...
DEFRULE RULE03 TRACE
...