ACFNRULE - New Rule Utility

Describes the ACFNRULE new rule utility.
acf2src
The ACFNRULE utility provides a simple means of adding rules to access and resource rule sets. ACFNRULE also provides a delete function to delete unwanted rules. ACFNRULE can execute as a batch program or as a TSO command. As a TSO command, ACFNRULE provides an additional verification facility for the delete function.
After ACFNRULE is executed, the modified rule set is automatically stored.
Files
  • SYSPRINT
    Specifies a file for the compiler output listing. If SYSPRINT is allocated to a data set instead of to SYSOUT, a complete detailed LIST of the compile messages will not appear. The complete LIST of compile messages is only available if SYSPRINT is sent to SYSOUT.
  • SYSIN
    This file is used when specifying multiple input lines to the ACFNRULE utility. The SYSIN file enables you to specify a set of parameters that exceeds 100 characters and is used only in batch. ACFNRULE can modify
    one
    ruleset per execution.
Parameters
ACFNRULE parameters are entered on the command line in the TSO environment and
from the JCL PARM field or SYSIN file in batch.
  • {[ADD(rule)][DELETE(string)]}
    Specifies any valid CA ACF2 access or resource rule to add to the rule set processed. ACFNRULE adds the rule to the end of the rule set. The CA ACF2 compiler reorders the rule set as needed during compilation. The DELETE parameter specifies that any line containing the exact string as displayed by the decompiler is deleted from the rule set processed. Lines deleted are listed on the SYSPRINT file or at the terminal if ACFNRULE is executed under TSO.
  • [CLASS(class)]
    Specifies the one-character class code of the infostorage rule set to be processed. The class code for CA ACF2 for DB2 rule sets is “D.” If CLASS is specified, a TYPE parameter must also be specified. If CLASS is not specified but TYPE is, CLASS(R) is assumed.
  • [KEY(key)]
    Specifies the key of the access or resource rule set processed. The default is the PREFIX value from your logonid. ACFNRULE can modify one ruleset per execution.
  • [LIST|NOLIST]
    Specifies whether the rule set is listed upon compilation. This listing is sent to SYSPRINT (for a batch job) or to the terminal (if run as a TSO command
  • [SYSID(sysid)]
    Use SYSID for externally compiled rule sets associated with a SYSID, such as DB2 rules. Specify the one- to eight-character SYSID for the rule set.
  • [TYPE(type)]
    Specifies the TYPE parameter is used to indicate the type of resource processed. If no TYPE parameter is specified, ACFNRULE assumes that an access rule set is processed. See the description of the previous CLASS parameter.
  • [VERIFY|NOVERIFY]
    Requests that the user is prompted for rule deletion. After listing the rules to delete, ACFNRULE asks for a YES or NO to actually delete the rules. If the user specifies NO, ACFNRULE terminates. The VERIFY function is not available in the batch environment.
Examples
The following are examples using ACFNRULE in batch, TSO, and SYSIN.
Take caution when performing a delete. If DEL(A) is coded, any line that contains an "A" is deleted.
ACFNRULE can modify
one
ruleset per execution.
Using the ACFNRULE in Batch
The following is an example using ACFNRULE in batch:
//ADDRULE EXEC PGM=ACFNRULE,REGION=128K, // PARM='KEY(SYS1),DEL(PARMLIB),ADD(PARMLIB UID(ABC), // LIB(''ACF2.PROD'') READ(A))' //SYSPRINT DD SYSOUT=* To do multiple adds and updates in batch: //ADDRULE EXEC PGM=ACFNRULE,REGION=128K, // PARM='KEY(SYS1),ADD(PROCLIB UID(ABC)),ADD(PARMLIB UID(ABC))' //SYSPRINT DD SYSOUT=* The following is an example of the ACFNRULE utility in batch, with output directed to a dataset: //ADDRULE EXEC PGM=ACFNRULE,REGION=128K, // PARM='KEY(SYS1),DEL(PARMLIB)' //SYSPRINT DD DSN=RULE.OUTPUT,DISP=(MOD,CATLG), // UNIT=SYSDA,SPACE=(TRK,(1,1)).
The following is an example of the ACFNRULE utility in batch, with input from SYSIN:
//ADDRULE EXEC PGM=ACFNRULE,REGION=128K //SYSPRINT DD SYSOUT=A //SYSIN DD DSN=NRULE.INPUT,DISP=SHR or: //ADDRULE EXEC PGM=ACFNRULE,REGION=128K //SYSPRINT DD SYSOUT=A //SYSIN DD * KEY(RESRULE) TYPE(CAI) DEL(- L3NG.VERY.LONG.RESOURCE.NAME.FOR.TESTING.EXTENDED.RESOURCE.RULE.NAMES.L4- NG.VERY.LONG.RESOURCE.NAME.FOR.TEST UID(USERT99) ALLOW) ADD(- L09G.VERY.LONG.RESOURCE.NAME.FOR.TESTING.EXTENDED.RESOURCE.RULE.NAMES.- L2NG.VERY.LONG.RESOURCE.NAME.FOR.TESTING.EXTENDED.RESOURCE.RULE.NAMES.LNG.VERY.LONG.RESOURCE.NAME.FOR.TEST UID(USERS99) ALLOW) To do multiple adds and updates in batch with input from SYSIN: //SYSIN DD * KEY(RULE) ADD(PROCLIB UID(ABC) R(A)) ADD(TESTLIB UID(DBS) R(A))
Using the ACFNRULE in TSO
The following is an example using the ACFNRULE in TSO:
ACFNRULE KEY(SYS1) DEL(PARMLIB) ADD(PARMLIB UID(ABC) LIB(''ACF2.PROD'') R(A))
To do multiple adds and updates in TSO:
ACFNRULE KEY(KENTST) ADD(TEST UID(XYZ) R(A)),ADD(DFG UID(TST) R(A)) or: ACFNRULE KEY(KENTST) DEL(TEST UID(ABC)),DEL(PARMLIB)
Writing CLISTS for the ACFNRULE
ACFNRULE might become more useful if various CLISTs are written to aid in common functions. For example, the following CLIST adds a rule enabling consultants to read a data set for three days:
PROC 1 DSN FOR(3) ACFNRULE KEY(&SYSUID.) ADD(&DSN. UID(**C) READ(A) FOR(&FOR.)) NOVERIFY