> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Johnny Luo
> Sent: Friday, January 06, 2006 2:35 AM
> To: [email protected]
> Subject: To create many RACF profiles at one time
> 
> 
> Recently I've got a new test system and there is no profile 
> in its RACF at
> all.
> Now I want to set RACF 'protectall',but before that,I should 
> create profile
> for all HLQs of data sets in the sytem first.
> 
> For a HlQ,I want to:
> 1,Define a group whose name=HLQ
> 2,Create a profile for it like HLQ.**  and set UACC(read)
> 
> 
> Because there are many data sets in the sytem,it's a tiring job.
> Now my plan is:
> 1,list all data sets in system and record  all HLQs.
> 2,Using JCL to issue RACF commands.
> 
> However,for each HLQ I need a JCL step and this means I must
> copy-and-paste many times.So I want a better way to do this.Maybe
> using REXX?
> 
> Hope anyone can give me some hints on this.

//STEP1 EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC DD DISP=SHR,DSN=my.rexx.library
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
 EXECUTIL SEARCHDD(YES)
%DOHLQS
/*
//HLQS DD *
HLQ1
HLQ2
HLQ3
/*

In "my.rexx.library" have a member named DOHLQS which looks similar to:

/* REXX */
DO FOREVER
   "EXECIO 1 DISKR HLQS"
   IF RC <> 0 THEN LEAVE
   PARSE PULL HLQ
   "AG "HLQ" OWNER(SYS1) SUPGROUP(SYS1)"
   "ADDSD '"HLQ".*.**' UACC(NONE) DFP(RESOWNER(SYS1)) OWNER("HLQ")"
END
"EXECIO 0 DISKR HLQS(FINIS"


Note that you may well want to change the parameters to the AG and ADDSD
comands to fit your requirements. You can do the equivalent by just
entering the AD and ADDSD commands in the //SYSTSIN instead of the
%DOHLQS command. I just think it is a bit easier to use the REXX.


--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to