How can I run a TEST command against a resource or access rule in batch?

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

Question:

Can a TEST of a dataset or resource rule be done in batch?

 

Answer:

Yes. Using the ACFBATCH program, rules can even be compiled, and then tested. Compiles and tests need to be done in separate steps or jobs. Here is some sample JCL:

//jobcard            <===== enter a jobcard that matches your shop standards
//STEP1    EXEC PGM=ACFBATCH,PARM='ACFCOMP *'
//SYSPRINT DD SYSOUT=*
//SYSIN    DD  *
$KEY(ABC123)
TEST.DATA UID(ABC*****) R(A) W(A)
SPECIAL.DATA UID(ABC*****) R(A) 
SPECIAL.DATA UID(ABC12*) R(A) W(A)
/*
//STEP2    EXEC PGM=ACFBATCH
//SYSPRINT DD SYSOUT=*
//SYSIN    DD  *
TEST ABC123
DSN('ABC123.SPECIAL.DATA') LID(logonid)    <=== logonid is the ACF2 logonid to be tested
/*
//

See the CA ACF2 Report and Utilities Guide for more information on other parameters that can be used.