Copy bulk Logonids from one DB to another DB in ACF2
search cancel

Copy bulk Logonids from one DB to another DB in ACF2

book

Article ID: 204091

calendar_today

Updated On:

Products

ACF2 ACF2 - z/OS ACF2 - MISC

Issue/Introduction

There is a requirement to copy a big list of Logonids from one system to another. What process can be used to list the logonids and automatically build the commands to replicate the list of ids on the secondary system?

Environment

Release : 16.0

Component : CA ACF2 for z/OS

Resolution

The LIST with ARCHIVE and INTO parameters can be used to build the commands needed to both INSERT the user and  re-add the user to any role within which they are included. The commands are stored into the specified PDS dataset by logonid, and can then be run as a batch job against another logonid database. Either IKJEFT01 or ACFBATCH programs can be used for the update.

For example, the following job will update (or create  if not cataloged) a PDS with the commands to build the logonids in the PDS sysa.archive.pds with the memberids that match the logonid.

//ACFBATCH EXEC PGM=ACFBATCH                                     
//SYSPRINT  DD SYSOUT=*                                           
//SYSIN         DD *                                                  
LIST logonid1 ARCHIVE INTO('sysa.archive.pds')
LIST logonid2 ARCHIVE INTO('sysa.archive.pds')
  ...    ....     .....
  ...    ....     .....
LIST logonidy ARCHIVE INTO('sysa.archive.pds')
LIST logonidz ARCHIVE INTO('sysa.archive.pds')
/*

The ’sysa.archive.pds’  is then copied into a sequential file ‘sysa.archive.seq’( with ISPF 3.3, for example), so that all the commands are now in the sequential file.

The sequential file ‘sysa.archive.seq’ must be edited as appropriate for the PGM you are running to execute the commands :

  • delete all but the first occurrence of the “ ACF” command – if PGM= ACFBATCH is being run, delete that first occurrence too
  • delete the comment lines
  • find all the END lines; delete them and any continuation character in the last record preceding them.

The updated file ‘sysa.archive.seq’  can then be used on any lpar as input to the batch job in order to add the logonids into the ACF2 databases. Below are a TSO batch job example and a an ACFBATCH example. Either can be used, but the IKJEFT01 input must have the “ACF” command as the first record of input to establish the ACF2 environment.

//INSRTLIDS EXEC  PGM=IKJEFT01,REGION=1024K                  
//SYSPRINT  DD SYSOUT=*                                   
//SYSTSPRT DD SYSOUT=*                                     
//SYSTERM   DD SYSOUT=*                                    
//SYSOUT      DD SYSOUT=*                                    
//SYSTSIN     DD DISP=SHR,DSN=sysa.archive.seq


//ACFB EXEC PGM=ACFBATCH        
//SYSPRINT   DD SYSOUT=*          
//SYSIN          DD DISP=SHR,DSN=sysa.archive.seq