/* RACFSURU - create surrogate logonby resource for users */ /* Runs on the target system */ /* the input file is the user list created by the DIRLIST exec */ USERLIST='MIGRATE USERLST A' /* call CheckIp to verify that all input files exist */ Call CheckIp /* specify the group that will be given access to the LOGONBY */ /* resource */ GROUP='OSSVMGP' /* read the user list into an array */ 'pipe < 'USERLIST' | STEM USERS.' /* process each user ID in the array */ DO u = 1 TO USERS.0 SAY 'Processing USER:' USERS.u /* Process all user IDs except those in the list below */ Select When USERS.u = 'BILLGO' then NOP When USERS.u = 'CHANPHIL' then NOP When USERS.u = 'EDEANI' then NOP When USERS.u = 'EMDOW' then NOP When USERS.u = 'HELEN' then NOP When USERS.u = 'HOST003' then NOP When USERS.u = 'HOST004' then NOP When USERS.u = 'KRMOSER' then NOP When USERS.u = 'PET0001' then NOP When USERS.u = 'PET0003' then NOP When USERS.u = 'RJBRENN' then NOP When USERS.u = 'THEGREEK' then NOP Otherwise Do /* Define a RACF LOGONBY Resource in class SURROGAT and execute */ /* a RACF PERMIT command to allow the group specified to be able */ /* logon onto the user ID */ 'RAC RDEFINE SURROGAT LOGONBY.'USERS.u' UACC(NONE)' 'RAC PE LOGONBY.'USERS.u' CL(SURROGAT) ID('GROUP') ACC(READ)' End /* end otherwise do */ End /* End select */ End /* end user loop */ Exit CheckIp: /* check for the input files - exit with RC 04 if not found */ IFiles.1=USERLIST IFiles.0=1 Do C=1 to IFiles.0 ADDRESS COMMAND 'ESTATE 'IFiles.C If RC <> 0 then Do Say 'Input file 'IFiles.C' not found - terminating' Exit 4 End End Return