/* REXX */
/* ================================================================ */
/*                                                                  */
/* COPYRIGHT =                                                      */
/* Licensed Material - Property of IBM                              */
/*                                                                  */
/* 5724-I63, 5724-H88, 5655-N01, 5733-W61                           */
/* (C) Copyright IBM Corp. 1999, 2008                               */
/* All Rights Reserved                                              */
/* US Government Users Restricted Rights - Use, duplication or      */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.*/
/*                                                                  */
/* ================================================================ */
<!-- import documents/buildInfo -->
/* ================================================================ */
<!-- Change History:                                               -->
<!--                                                               -->
<!--  492063 H28W700 20080114   DMB: Remove rexx code step         -->
<!--  512969 V7.0   20080421 PXT: Delete comments in generated jobs-->
<!--  511429 V7.0   20080519   DMB: Create admin id in bbosbrac    -->
<!--511429.1 V7.0   20080519   DMB: Create SR id in bbosbrac       -->
<!--511429.2 V7.0   20080519   DMB: Fix incorrect variable         -->
<!--  534888 V7.0   20080708  PDOP: Common tstamps and build info  -->
<!--  550516 V7.0   20080708  PXT: Add Servant ID                  -->
<!-- F908-14696 V8.0 20090831 DMB: Generic RACF profiles support   -->
<!-- ============================================================= -->

say 'WebSphere Application Server RACF Setup                             '
say '-- Common Groups and users                                          '
say '-- Generated on ${ZDATE} at ${ZTIMEL}'

trace commands

/* ------------------------------ */
/* WebSphere servant region group */
/* ------------------------------ */
say 'Create WebSphere servant region group.                                    '
<!-- if (${zServantGroupGID}token != *token) -->
"ADDGROUP ${zServantGroup} OMVS(GID(${zServantGroupGID}))"                                          
<!-- endif -->
<!-- if (${zServantGroupGID}token == *token) -->
"ADDGROUP ${zServantGroup} OMVS(AUTOGID)"
<!-- endif -->
say

/* ------------------------------ */
/* WebSphere configuration group  */
/* ------------------------------ */
say 'Create WebSphere configuration group.                                     '
<!-- if (${zConfigurationGroupGID}token != *token) -->
"ADDGROUP ${zConfigurationGroup} OMVS(GID(${zConfigurationGroupGID}))"
<!-- endif -->
<!-- if (${zConfigurationGroupGID}token == *token) -->
"ADDGROUP ${zConfigurationGroup} OMVS(AUTOGID)"
<!-- endif -->
say

/* ----------------------------- */
/* WebSphere controller user ID  */
/* ----------------------------- */
say 'Adding WebSphere controller user ID.                    '
<!-- if (${zControlUid}token != *token) --> 
"ADDUSER ${zControlUserid} DFLTGRP(${zConfigurationGroup}) OMVS(UID(${zControlUid}) HOME(${zUserIDHomeDirectory}/" || ,
"${zConfigurationGroup}) PROGRAM(/bin/sh)) NAME('WAS CR OWNER')  NOPASSWORD NOOIDCARD"
<!-- endif -->
<!-- if (${zControlUid}token == *token) --> 
"ADDUSER ${zControlUserid} DFLTGRP(${zConfigurationGroup}) OMVS(AUTOUID HOME(${zUserIDHomeDirectory}/" || ,
"${zConfigurationGroup}) PROGRAM(/bin/sh)) NAME('WAS CR OWNER')  NOPASSWORD NOOIDCARD"
<!-- endif -->                                                                     
say

/* ----------------------------- */
/* WebSphere servant user ID     */
/* ----------------------------- */
say 'Adding WebSphere servant user ID.'
<!-- if (${zServantUid}token != *token) -->
"ADDUSER ${zServantUserid} DFLTGRP(${zServantGroup}) OMVS(UID(${zServantUid})" || ,
" HOME(${zUserIDHomeDirectory}/${zServantGroup}) PROGRAM(/bin/sh)) NAME('WAS APPSVR SR')"  || ,
" NOPASSWORD NOOIDCARD"
<!-- endif -->
<!-- if (${zServantUid}token == *token) -->
"ADDUSER ${zServantUserid} DFLTGRP(${zServantGroup}) OMVS(AUTOUID" || ,
" HOME(${zUserIDHomeDirectory}/${zServantGroup}) PROGRAM(/bin/sh)) NAME('WAS APPSVR SR')"  || ,
" NOPASSWORD NOOIDCARD"
<!-- endif -->
say

/* ----------------------------------- */
/* WebSphere administrator user ID     */
/* ----------------------------------- */
say 'Adding WebSphere administrator user ID'
<!-- if (${zAdminUid}token != *token) -->
"ADDUSER ${zAdminUserid} DFLTGRP(${zConfigurationGroup}) OMVS(UID(${zAdminUid}) " || ,
" HOME(${zUserIDHomeDirectory}/${zConfigurationGroup}) PROGRAM(/bin/sh)) NAME('WAS ADMINISTRATOR') " || ,
" NOPASSWORD NOOIDCARD"
<!-- endif -->
<!-- if (${zAdminUid}token == *token) -->
"ADDUSER ${zAdminUserid} DFLTGRP(${zConfigurationGroup}) OMVS(AUTOUID " || ,
" HOME(${zUserIDHomeDirectory}/${zConfigurationGroup}) PROGRAM(/bin/sh)) NAME('WAS ADMINISTRATOR') " || ,
" NOPASSWORD NOOIDCARD"
<!-- endif -->
say

/* ----------------------------------- */
/* WebSphere unauthenticated group     */
/* ----------------------------------- */
say 'Creating group for WebSphere unauthenticated userid.                      '
<!-- if (${zLocalUserGroupGID}token != *token) -->
"ADDGROUP ${zLocalUserGroup} OMVS(GID(${zLocalUserGroupGID}))"
<!-- endif -->
<!-- if (${zLocalUserGroupGID}token == *token) -->
"ADDGROUP ${zLocalUserGroup} OMVS(AUTOGID)"
<!-- endif -->
say

/* -------------------------------------------------------------- */
/* Allow WebSphere servant user ID 10000 concurrently open files  */
/* -------------------------------------------------------------- */
say 'Allow 10000 concurrently open files.'
"ALU ${zServantUserid} OMVS(FILEPROC(10000))"
say

/* ------------------------------------------------------------------- */
/* Connect WebSphere servant user ID to WebSphere configuration group  */
/* ------------------------------------------------------------------- */
say 'Connecting servant to the WebSphere configuration group. '
"CONNECT ${zServantUserid} GROUP(${zConfigurationGroup})"
say
                                                                           
say 'End of generated commands.                                          '