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

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

book

Article ID: 24628

calendar_today

Updated On:

Products

ACF2 ACF2 - DB2 Option ACF2 - z/OS ACF2 - MISC

Issue/Introduction

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

Environment

Release:
Component: ACF2MS

Resolution

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 are JCL sample TEST of a dataset rule and a sample of a TEST of a resource rule:

//jobcard            <===== enter a jobcard that matches your shop standards
//* DATASET RULE TEST //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 /* //

//jobcard <===== enter a jobcard that matches your shop standards
//* RESOURCE RULE TEST
//STEP1 EXEC PGM=ACFBATCH,PARM='ACFCOMP *' 
//SYSPRINT DD SYSOUT=* 
//SYSIN DD * 
$KEY(BPX) TYPE(FAC)                                                   
 AHFS.PROCESS.GETPSENT UID(ABC*****) SERVICE(READ) ALLOW  
 CAHFS.CHANGE.FILE.TIME UID(ABC*****) ALLOW                
 CAHFS.PROCESS.GETPSENT UID(ABC12*) SERVICE(READ) ALLOW
/* 
//STEP2 EXEC PGM=ACFBATCH 
//SYSPRINT DD SYSOUT=* 
//SYSIN DD *
SET RESOURCE(FAC) 
TEST BPX 
RSRCNAME('BPX.CAHFS.PROCESS.GETPSENT') LID(logonid) SERVICE(READ) <=== 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.