Hello, thank you !! this worked great..... I skipped the last part, DELETE but thanks for showing me how to do that as well.
I allocated a dataset in the CKRCMD DD from the 2nd 'EXEC C2RC' to produce the commands for manual review before executing. This is exactly what I was looking for. Thanks !
Original Message:
Sent: Tue September 03, 2024 04:19 AM
From: Rob van Hoboken
Subject: List of users - then Delete
Hi Joe
If you run the CARLa script in ISPF, it generates a list of REMOVE commands in the CKR2PASS file. You issue the RUN command in the command line, or enter an R
line command in front of CKR2PASS in the Results
selection list, to execute the REMOVE commands. This results in a CKRCMD file, and again you issue RUN command or the R
line command.
If you run in batch, you need 3 JCL steps like so:
// EXEC C2RC//CKR2PASS DD DISP=(,PASS),DSN=&REMOVES,SPACE=(TRK,(10,10))//SYSIN DD *newlist type=racf name=racfsel outlim=1 nopage dd=ckr2pass select segment=base class=user OWNER=ABCUSERS last_connect_date<TODAY-120 exclude class=user key=myid sortlist "SUPPRESS MANAGERACFVARS DELETEDATASETS"newlist type=racf name=userlist nopage dd=ckr2pass select likelist=racfsel sortlist "REMOVE USER=" | key(0)// EXEC C2RC//REMOVES DD DISP=(OLD,PASS),DSN=&REMOVES//CKRCMD DD DISP=(,PASS),DSN=&RACFCMDS,SPACE=(TRK,(10,10))//SYSIN DD * /* you could enter ALLOC commands for a RACF input source and a CKFREEZE before the include commandinclude dd=removes//DELETE PGM=CKX,PARM='DD=CKRCMD'//CKXT@PRT DD SYSOUT=*//CKRCMD DD DISP=(OLD,PASS),DSN=&RACFCMDS
Add STEPLIB and JCLLIBs as needed.
Note: you probably to test this out VERY CAREFULLY because the last step may delete more than you anticipated.
------------------------------
Rob van Hoboken
Original Message:
Sent: Mon September 02, 2024 12:34 PM
From: Joseph Sumi
Subject: List of users - then Delete
Hello - thanks, the carla produces:
REMOVE USER= ABCD
REMOVE USER= EFGH
...
But i need to go one step further and also execute the REMOVES that are in the CKR2PASS DD to produce the command report for the user deletes.
Thanks.
------------------------------
Joseph Sumi
------------------------------