Previous Topic: Using ACF COMPILE to Build Access Rules from a TerminalNext Topic: Using ACF STORE to Store Access Rules


Compiling an Access Rule from a CMS File

When entering a rule set into a file, you can use the COMPILE subcommand of ACF to enter the rule set into the Rule database. The filetype of the rule set must always be RULE. CA ACF2 for VM automatically attempts to store your rules (that is, add them to the database). The syntax for this subcommand is:


 COmpile fn [ List|NOList  ]
            [ Store|NOStore]
            [ Force|NOForce]
fn

Indicates the filename you entered when you write a rule in a specific file and want to compile it from that file. This file must have a filetype of RULE. Do not use filenames of LIST or NOLIST, FORCE or NOFORCE, or STORE or NOSTORE (or any of their valid abbreviations) when you compile data set access rules because you will receive error messages.

List|NOList

LIST displays the compiler input on your screen. This is the default. NOLIST suppresses the input display.

Store|NOStore

The STORE option stores the rule set when CA ACF2 for VM compiles it. NOSTORE does not store the rule. To store it, issue the STORE subcommand. STORE is the default.

Force|NOForce

The NOFORCE option compiles a file containing multiple rule sets, but only stores rule sets that do not already exist on the Rule database. FORCE (the default) stores all compiled rule sets.

CA ACF2 for VM uses the normal CMS search order when looking for the specified filename. If you have not previously entered rules into a file, you can use the COMPILE and STORE subcommands to enter them directly into CA ACF2 for VM:

acf
ACF
 
COMPILE (filename)
ACFpgm510I ACF COMPILER ENTERED
 
 $KEY (index)
 
  (rule entry)
  (rule entry)
 
  (press ENTER)
 
ACFpgm551I TOTAL RECORD LENGTH=length BYTES ‑ percent PERCENT
UTILIZED
 
ACF
 
STORE

Ditto Function

CA ACF2 for VM also provides a convenient method for repeating specific components of a rule entry. For example, you can write rule entries to allow the same group of users access to your files. You can use a ditto, or quotation mark, to repeat that group (UID parameter) in several rule entries:

ACF
acf
COMPILE
$KEY(MAINT)
 V0191.BACKLIDS UID(AUT*1*A) SOURCE(GRP1) R(A) W(A)
 V0191.BACKRULE UID(“) SOURCE(“) R(A) W(A)

When CA ACF2 for VM compiles the above rule, the UID (“) and SOURCE(“) entries are copied from the V0191.BACKLIDS rule entry. This feature is limited to values specified in rule entries only. Ditto marks do not apply to the control statements of the rule set.

Because a ditto mark (“) in CP is the default terminal escape character, we recommend that you redefine the default CP escape character to a character that you do not use very often.