ACF2 REXX CLIST/program for ACF administrative commands to LIST, INSERT logonids or Update Rules
search cancel

ACF2 REXX CLIST/program for ACF administrative commands to LIST, INSERT logonids or Update Rules

book

Article ID: 202640

calendar_today

Updated On:

Products

ACF2 ACF2 - z/OS ACF2 - MISC

Issue/Introduction

What options are available in a REXX CLIST program to issue ACF subcommands to perform ACF2 administration such as LIST, INSERT a logonid(LID) to see if it exists or to create/update rules?  This option will also need to allow for the back-and-forth prompting which is typical during an in-person TSO provisioning conversation. Is there a REXX ACF2 interface? 

Environment

Release : 16.0

Component : CA ACF2 for z/OS

Resolution

A REXX exec/program can issue TSO commands such as the TSO ACF command, there is no interface. For an example see the ACF2 installation library ...CAX1EXEC members such as  BPXWIRAC for an example. There is a "func='USERS'" that lists logonids.

Below are sample REXX examples of

  • LISTing a logonid
  • INSERTing a logonid
  • Prompting of the user for parameters and frontend to prompt for confirmation of a delete of a logonid
  • Create/update a rule

/*ACFREX REXX*/                                
queue "SET LID";                        
queue "INSERT REXXLID NAME(test)";      
queue "LIST LIKE(*)";               
queue "END";                            
address tso 'ACF';                      

/*INSLID REXX*/                               
say "Enter the logonid to be INSERTed" 
pull fld1 fld2 fld3 fld4               
say fld1 fld2 fld3 fld4                
queue "SET LID";                       
queue "INSERT" fld1 fld2 fld3 fld4 ;   
queue "LIST LIKE(rexx-)";              
queue "END";                           
address tso 'ACF';                      

/* ACFDELID REXX */                                                       
/* THIS CLIST IS A SAMPLE REXX THAT FRONT ENDS ACF DELETE      */
/* OF A LOGONID BY PROMPTING FOR CONFIRMATION                  */
/* Syntax:  ACFDELID logonid                                   */
TRACE OFF                                                        
ARG INPUT                                                        
IF INPUT = '' THEN DO                                            
   SAY 'NO LOGONID entered, exiting'                             
   exit                                                          
END                                                              
logonid = INPUT                                                  
SAY 'Are you sure you want to delete logonid: ' logonid          
PULL INPUT .                                                     
IF INPUT ¬= 'Y' THEN EXIT                                        
sUser = SYSVAR(SYSUID)                                           
say logonid                                                      
queue "LIST " logonid                                            
queue "delete" logonid                                           
queue "end"                                                      
"ACF"                                                            
SAY 'RC= ' rc                                                    

/* ACFRULE REXX */   
/* THIS CLIST IS A SAMPLE REXX THAT USES RECKEY TO UPDATE      */
/* A RULE $KEY(TEST) TYPE(TST)                                 */
SAY 'Compile a rule'                               
queue "SET R(TST)"                                 
queue "reckey test add( - USER(USRTEST) ALLOW)"    
queue "end"                                        
"ACF"