I was with a customer who wanted to replicate their queue manager. The could export the object definitions with CSQUTIL MAKEDEFS, but they asked about the RACF definitions.
I have created MQRACF.REXX
Which extracts RACF definitions in a format that can be edited and run as a batch job.
This allow you to create definitions for another queue manager, or a QSG, or you can create mixed case definitions.
The output is like
*DEL RDELETE MQCMDS MQPC.ALTER.AUTHINFO *DEF RDEFINE MQCMDS MQPC.ALTER.AUTHINFO - *DEF OWNER(PAICE1) - *DEF UACC(NONE ) - *DEF RAUDIT(FAILURES(READ) ) - *DEF WARNING(TRUE ) *PER PERMIT ID(SCENU) ACCESS(ALTER) *PER PERMIT ID(PAICE) ACCESS(ALTER) *PER PERMIT ID(SCENR) ACCESS(ALTER) *DEL RDELETE MQCMDS MQPC.ALTER.BUFFPOOL ....
From the output you can use ISPF edit commands such as
F *DEL ALL
DEL ALL X
C *DEL ''
which will give you just RDLETE commands.
//PAICEAL JOB 1,MSGCLASS=A //STEP1 EXEC PGM=IRXJCL,PARM='MQRACF MQCMDS MQPC.DIS MQPC.DIS' //* NEXT DD IS THE DATA SET EQUIVALENT TO TERMINAL OUTPUT //SYSTSPRT DD SYSOUT=* //SYSEXEC DD DISP=SHR,DSN=PAICE.CLIST.LIB
The first parameter is the RACF class, in this case MQCMDS
The second parameter is for the start prefix. In this example any value > MQPC.DIS
The third parameter is the end prefix. Any profile name <= the end prefix will be displayed.
In this case it will display all profiles for MQPC beginning with DIS
Another example is
PARM='MQRACF MQCMDS MQPA'
which will display any profile > MQPA, so will include MQPB, NEW1 etc