Testing a rule set
You can test a rule set in a batch environment by using the TRY command. You should always test a rule set before using it in a production system or activating it at the subsystem level. You can also obtain detailed information about the test results.
Coding TRY statements
To code a TRY statement, use the following syntax:
;
Using the TRY command
Test a rule set by using the TRY command, as shown in the following example:
TRY JOB(PGNL010) PROGRAM(INV987) DSN(GNLP.MASTER.ACCNTS);
TRY JOB(MGNL010) PROGRAM(INV987) DSN(GNLP.MASTER.ACCNTS);
TRY JOB(MGNL010) PROGRAM(INV100) DSN(GNLP.MASTER.ACCNTS);
TRY JOB(MGNL010) PROGRAM(INV200) DSN(GNLP.EXPENSE.REPORT);
Using the JOB, PROGRAM, and DSN keywords
Use the JOB, PROGRAM, and DSN keywords to identify the particular job, program, and data set name to test. The values of these keywords are, respectively, the job name, the program name, and the data set name.
Obtaining detailed test results
You can add the TRACE_ON keyword to the ACTIVATE RULE_SET command to obtain a detailed trace of all rules that RUV examines and the decisions about whether to bypass, accept, or reject the rules. You can control the amount of information produced by setting the appropriate reporting level (summary, detail, or full) with the SET REPORT command. For more information, see Using-the-REPORT-keyword.
The following figure shows an example of the results of the TRY command when the reporting level is set to SUMMARY:
354 TRACE_ON
355 ;
RUV202177I RUV JOB LEVEL RULE SET: V11TEST
RUV202177I RUV SYSTEM LEVEL RULE SET: $EXCLUDE_ALL
356 SET REPORT(SUMMARY);
357 TRY JOB(ISIRAPZU) PROGRAM(ZZUKSDS)
2009.015 20:09:03 GMT BMC AMI RECOVERY for VSAM--VERSION 04.01.00 PAGE: 2
2009.015 15:09:03 LOCAL COPYRIGHT BMC SOFTWARE, INC. 2020
REPORT LEVEL: SUMMARY
358 DSN(ISIRAM.RUV.TEST.KSDS);
MATCHED JOB: ISIRAP* PROGRAM: *
MATCHED VSAM: ISIRAM.*
BACKOUT JOURNALING FOR DSNAME: ISIRAM.RUV.TEST.KSDS
FORWARD JOURNALING FOR DSNAME: ISIRAM.RUV.TEST.KSDS
The following figure shows an example of the results when the reporting level is set to DETAIL:
357 TRACE_ON
358 ;
RUV202177I RUV JOB LEVEL RULE SET: V11TEST
RUV202177I RUV SYSTEM LEVEL RULE SET: $EXCLUDE_ALL
359 SET REPORT(DETAIL);
360 TRY JOB(ISIRAPZU) PROGRAM(ZZUKSDS)
2009.015 20:09:03 GMT BMC AMI RECOVERY for VSAM--VERSION 04.01.00 PAGE: 2
2009.015 15:09:03 LOCAL COPYRIGHT BMC SOFTWARE, INC. 2020
REPORT LEVEL: DETAIL
361 DSN(ISIRAM.RUV.TEST.KSDS);
JOB LEVEL RULE SET
JOB: ISIRAB* PROGRAM: *
JOB: ISIRAL* PROGRAM: *
JOB: ISIRAJ* PROGRAM: *
MATCHED JOB: ISIRAP* PROGRAM: *
LOG (V11_LOG)
JOURNAL (V11_JRNL)
JOURNAL_ABEND (CONTINUE)
JOB_ABEND (SUBMIT)
JOB_JCL ($DEFAULT)
INTERNAL_READER (V11_INTRDR_PDS)
JOB LEVEL RULE SET
VSAM: RUVRUV.QA*
MATCHED VSAM: ISIRAM.*
BACKOUT JOURNALING FOR DSNAME: ISIRAM.RUV.TEST.KSDS
FORWARD JOURNALING FOR DSNAME: ISIRAM.RUV.TEST.KSDS
The following figure is a test of the rule set and the results that display when the reporting level is set to FULL:
357 TRACE_ON
358 ;
RUV202177I RUV JOB LEVEL RULE SET: V11TEST
RUV202177I RUV SYSTEM LEVEL RULE SET: $EXCLUDE_ALL
359 SET REPORT(FULL);
360 TRY JOB(ISIRAPZU) PROGRAM(ZZUKSDS)
JOB LEVEL RULE SET
JOB: * PROGRAM: DFH*
JOB: * PROGRAM: DFS*
JOB: * PROGRAM: DXP*
JOB: * PROGRAM: VHC*
JOB: * PROGRAM: DSN*
JOB: * PROGRAM: ARC*
JOB: * PROGRAM: GIM*
JOB: * PROGRAM: RUVZSM0
JOB: * PROGRAM: DFSSORT
JOB: * PROGRAM: ISIDRS
JOB: * PROGRAM: RPCMAIN
JOB: * PROGRAM: RCMBOPG
JOB: * PROGRAM: ISIMGR
JOB: * PROGRAM: JMPMAIN
JOB: * PROGRAM: ISICFM
JOB: * PROGRAM: ARCCTL
JOB: * PROGRAM: IEFIIC
JOB: * PROGRAM: S200MAI
JOB: * PROGRAM: RUV*
MATCHED JOB: TST* PROGRAM: KUPDATE
JOURNAL ($DEFAULT)
JOURNAL_ABEND (CONTINUE)
JOB_ABEND (SUBMIT)
JOB_JCL ($DEFAULT)
INTERNAL_READER ($DEFAULT)
JOB LEVEL RULE SET
MATCHED VSAM: *
EXCLUDED DSNAME: TST.RUV.SAMPLE
RUV202420I RUV BCSS USING JOB LEVEL RULE SET: TESTING
RUV202420I RUV BCSS USING SYSTEM LEVEL RULE SET: RUV_TEST
RUV202421I RUV BCSS SELECTED BY JOB MASK: TST* PROGRAM MASK: KUPDATE
RUV202430I RUV BCSS LOG AND JOURNAL MODEL OR DSNAME ARE THE SAME; BLENDING IN
EFFECT.
RUV202420I RUV BCSS LOG MODEL: $DEFAULT PROTECTION LEVEL 1
RUV202425I RUV BCSS // DD DSN=RUVRUV.D2009061.T2139403.DEFAULT,
RUV202425I RUV BCSS // SPACE=(CYL,(15,5),RLSE),
RUV202425I RUV BCSS // DISP=(MOD,DELETE,CATLG),
RUV202425I RUV BCSS // UNIT=WORK
RUV202426I RUV BCSS ALLOCATED LOG DDNAME: SIMLOG DSNAME:
RUVRUV.D2009061.T2139403.DEFAULT
RUV202420I RUV BCSS JOB_JCL MODEL: $DEFAULT
RUV202417I RUV BCSS BACKOUT JCL WILL BE SUBMITTED TO JES CLASS A.
RUV202420I RUV BCSS SUPPORT FOR X37 ON QSAM LOG WAS NOT REQUESTED
RUV202420I RUV BCSS RECOVERY JOB_JCL:
RUV202425I RUV BCSS //ISIRAMRJ JOB (4540),
RUV202425I RUV BCSS // MSGCLASS=X,CLASS=A,
RUV202425I RUV BCSS // REGION=4M,NOTIFY=&SYSUID
RUV202425I RUV BCSS //*
RUV202425I RUV BCSS //* THIS IS A RECOVER BACKOUT JOB FOR:
RUV202425I RUV BCSS //* JOB: ISIRAMRS
RUV202425I RUV BCSS //* STEP: LOADDFLT
RUV202425I RUV BCSS //* DATE: 2009061
RUV202425I RUV BCSS //* TIME: 2139404
RUV202425I RUV BCSS //* RUV LOG: RUVRUV.D2009061.T2139403.DEFAULT
RUV202425I RUV BCSS //* RUV JOURNAL: NULLFILE
RUV202425I RUV BCSS //*
RUV202425I RUV BCSS //RUVRECOV EXEC PGM=RUVZSM0
RUV202425I RUV BCSS //STEPLIB DD DISP=SHR,DSN=...YOURNAME...LOAD
RUV202425I RUV BCSS //SYSPRINT DD SYSOUT=*
RUV202425I RUV BCSS //SYSIN DD *
RUV202425I RUV BCSS SET SUBSYSTEM(BCSS);
RUV202425I RUV BCSS ARCHIVE_IN(RUVRUV.D2009061.T2139403.DEFAULT)
RUV202425I RUV BCSS ;
This rule set was built in the Constructing-rule-sets topic. It provides you with a preview of what would happen if you execute the KUPDATE program.
The TRY command generates journal, log, and internal reader allocation JCL and recovery JCL. It allows you to view the search of the rule set and the results of the rule set. The preceding figure shows each job rule as it is being tested. When a matching rule is found, the complete rule is displayed. Journal and log allocations are simulated, and internal reader and recovery JCL expansions are also performed and displayed. This report provides you with a simulated picture of what will happen when the job actually runs.
It also shows errors that would occur. The most common error is undefined user variables. Look for the following error message:
Review the generated JCL to determine if it is what you want. You can see that additional tailoring is needed for JOB_JCL($DEFAULT). The STEPLIB is invalid, consequently, you need to correct the default recovery JCL or select another JOB_JCL template.
You may wish to customize other parts of the rule set (JOB_JCL, JOURNAL_MODEL, INTERNAL_READER) in order to achieve the precise protection you desire.
Related topic