I need to validate files in CICS. How do I write the rules?

Document ID : KB000025712
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:  

I need to validate files in CICS. How do I write the rules? 

Answer:  

I have reviewed the rule writing process for the CA ACF2/CICS interface. For file control tables, I will use resource type CFC based on my CICSKEY parameter, CICSKEY OPTION=VALIDATE,TYPE=CFC,RESOURCE=FILE. But what do I use for the $KEY in the resource rule - do I use the dataset name or the DDNAME?

The $KEY value needs to be the DDNAME that was specified when the file/dataset was created by CICS Resource definition (RDO) . The define panel in the CEDA CICS transaction specifies DSNAME and FILE name. The DSNAME is the dataset name and FILE is the DDNAME referenced in the CICS JCL.

The DDNAME should be specified as the $KEY in the resource rule.
For example, in the CEDA transaction, you created a file definition for DDNAME PAYMAST which is DATASET SYS4.PAYROLL.MASTER.FILE;

FILE(PAYMAST) DSNAME(SYS4.PAYROLL.MASTER.FILE)

The $key of the CA ACF2 resource rule would look like:

$KEY(PAYMAST) TYPE(CFC)

Additional Information: 

Sample file rules can be found in the CA ACF2™ for z/OS CICS Support Guide Chapter 2: Administration of the CICS Interface section 'Sample File Rules'.