Previous Topic: Create a Test RuleNext Topic: Activate Command Limiting


Test the Model

To be sure your model behaves as intended in a production environment, thoroughly test the syntax model. You should test both valid and invalid operand combinations. Before you begin testing, you should probably have a hardcopy of both the syntax of the command and your syntax model. If your command and model are complex, you may also want to write an exec to drive the test. This exec can also come in handy when you need to write rules and want to test the correctness of them.

You can use the following rudimentary exec to drive the test.

/* THIS EXEC TESTS VARIOUS COMBINATIONS OF THE VSNAP COMMAND */
'ID (STACK'
pull userid .;
say ' '
say 'VALID VSNAP COMBINATIONS'
say ' '
 
queue 'SET CMDLIM'
queue 'TEST VSNAP MDLTYPE(TST)'
queue 'CLASS(A)'
 
queue 'O(USER MAINT)'
queue 'O(USER MAINT 0-END)'
queue 'O(USER MAINT 0-END SYSTEM)'
queue 'O(USER MAINT 0-END TO *)'
queue 'O(USER MAINT 0-END TO ' userid ')'
queue 'O(USER MAINT 0-END TO ' userid 'FORMAT xxxx)'
queue 'O(USER MAINT 0-END TO ' userid 'FORMAT xxxx DUMPID xxxx)'
queue 'O(USER MAINT 0-END TO ' userid 'FORMAT xxxx DSS DUMPID xxxx)
queue 'O(ALL)'
queue 'O(V=R)'
queue 'O(CP)'
queue 'END'
queue 'END'
ACF
say ' '
say 'SOME INVALID VSNAP OPERAND COMBINATIONS'
say ' '
 
queue 'SET CMDLIM'
queue 'TEST VSNAP MDLTYPE(TST)'
queue 'CLASS(A)'
 
queue 'O(USERMAINT)'
queue 'O(USER XMAINT)'
queue 'O(USER GEORGEIOUS)'
queue 'O(ALL WHET)'
queue 'O(ALT)'
queue 'O(V-R)'
queue 'O(CQ)'
queue 'END'
queue 'END'
ACF
 
exit

You can issue the exec from CMS and observe the following:

Ready; T=0.01/0.01 18:33:11
vsnap
valid vsnap combinations
ACF
CMDLIM
cmd=vsnap, mdltype=tst
 .
THE FOLLOWING PARAMETERS ARE IN EFFECT:
 DATE=01/04/00, TIME=*****, UID=******, SOURCE=********
 CLASS=A
 OPERANDS=
 
THE FOLLOWING WOULD APPLY: ALLOW (RELATIVE RULE ENTRY 1)
 .
THE FOLLOWING PARAMETERS ARE IN EFFECT:
 DATE=01/04/00, TIME=*****, UID=******, SOURCE=********
 CLASS=A
 OPERANDS=USER MAINT
 .
 .
 .
CMDLIM
some invalid vsnap operand combinations
ACF
CMDLIM
cmd=vsnap, mdltype=tst
 .
THE FOLLOWING PARAMETERS ARE IN EFFECT:
 DATE=01/04/00, TIME=*****, UID=******, SOURCE=********
 CLASS=A
 OPERANDS=
 
THE FOLLOWING WOULD APPLY: ALLOW (RELATIVE RULE ENTRY 1)
 .
THE FOLLOWING PARAMETERS ARE IN EFFECT:
 DATE=01/04/00, TIME=*****, UID=******, SOURCE=********
 CLASS=A
 OPERANDS=USERMAINT
 
COMMAND SYNTAX ERROR, LID SYNERR=LOG (OPERAND NUMBER 1 IS IN ERROR)
 .
 .
 .
CMDLIM
Ready; T=0.16/0.69 18:33:41

Model Problem Support

If your results do not work as expected, fix the model, recompile it, and execute the test again. If you cannot determine what the problem is, contact your local CA ACF2 for z/ VM support representative for assistance. Before contacting CA ACF2 for z/ VM support, have the following ready:

If the support personnel cannot solve your problem on the phone, you may need to send the above information to them.