//&MEMBER  JOB &BBOJCL1                                                         
&BBOJCL2                                                                        
&BBOJCL3                                                                        
&BBOJCL4                                                                        
//********************************************************************/         
//*  copy files to HFS                                               */         
//********************************************************************/         
//COPYUSS EXEC  PGM=IKJEFT1A                                                    
//* Copy customized members to the HFS files                                    
//SYSEXEC   DD DISP=SHR,DSN=&TRGHLQ..DATA                                       
//SYSTSPRT  DD SYSOUT=*                                                         
//SYSTSIN   DD *                                                                
%BBOWCPYA                                                                       
/*                                                                              
//********************************************************************/         
//*  convert files to ASCII.                                         */         
//********************************************************************/         
/*                                                                              
//E2ASCRPT EXEC PGM=IKJEFT01,REGION=0M                                          
//SYSTSPRT DD  SYSOUT=*                                                         
//SYSTSIN  DD  *                                                                
 BPXBATCH SH +                                                                  
   /tmp/bbowe2aa_&TIMESTMP..sh  +                                               
     1>> /tmp/bbowaddn_&TIMESTMP..out +                                         
     2>> /tmp/bbowaddn_&TIMESTMP..err                                           
/*                                                                              
)SEL &ANNOGP. ^= DefaultNodeGroup                                               
//********************************************************************/         
//*  call createNodeGroup.                                           */         
//********************************************************************/         
/*                                                                              
//CNGSCRPT EXEC PGM=IKJEFT01,REGION=0M                                          
//SYSTSPRT DD  SYSOUT=*                                                         
//SYSTSIN  DD  *                                                                
 BPXBATCH SH +                                                                  
   &MOUNTAN.+                                                                   
   /&ASDIRNAN.+                                                                 
   /bin/wsadmin.sh +                                                            
    -host &DMNOHOST. +                                                          
    -port &DMSPORT. +                                                           
)SEL &ANDMS = Y                                                                 
    -username &FEDADMN. +                                                       
    -password &FEDPASS. +                                                       
)ENDSEL                                                                         
    -f /tmp/createNodeGroup_&TIMESTMP..jacl +                                   
      &ANNOGP. +                                                                
     1>>>> /tmp/bbowaddn_&TIMESTMP..out +                                       
     2>>>> /tmp/bbowaddn_&TIMESTMP..err                                         
/*                                                                              
)ENDSEL                                                                         
//********************************************************************/         
//*  Run addNode.sh                                                  */         
//********************************************************************/         
//BBOWAN   EXEC PGM=IKJEFT01,REGION=0M                                          
)SEL &LSPROD = Y                                                                
//STEPLIB  DD DISP=SHR,DSN=&BBOLOAD                                             
//         DD DISP=SHR,DSN=&BBGLOAD                                             
)ENDSEL                                                                         
//SYSTSPRT DD  SYSOUT=*                                                         
//SYSTSIN  DD  *                                                                
 BPXBATCH SH +                                                                  
   &MOUNTAN.+                                                                   
   /&ASDIRNAN.+                                                                 
   /bin/addNode.sh +                                                            
   &DMNOHOST. +                                                                 
   &DMSPORT. +                                                                  
)SEL &ANINCAPP = Y                                                              
   -includeapps +                                                               
)ENDSEL                                                                         
)SEL &ANINCBUS = Y                                                              
   -includebuses +                                                              
)ENDSEL                                                                         
)SEL &LAUNCHNA = N                                                              
   -noagent +                                                                   
)ENDSEL
)SEL &ANSEC = Y
   -localusername &ASADMN. +
   -localpassword &ASPASS. +
)ENDSEL                                                                         
)SEL &ANDMS = Y                                                                 
   -username &FEDADMN. +                                                        
   -password &FEDPASS. +                                                        
)ENDSEL                                                                         
   -nodegroupname &ANNOGP. +                                                    
   -portprops /tmp/portFile_&TIMESTMP..props +                                  
   -nodeagentshortname &ANSSNS. +                                               
     1>>>> /tmp/bbowaddn_&TIMESTMP..out +                                       
     2>>>> /tmp/bbowaddn_&TIMESTMP..err                                         
/*                                                                              
//********************************************************************/         
//*  delete portFile from the HFS (/tmp)                             */         
//********************************************************************/         
//DELETEP  EXEC PGM=IKJEFT01,REGION=0M                                          
//SYSTSPRT DD  SYSOUT=*                                                         
//SYSTSIN  DD  *                                                                
 BPXBATCH SH +                                                                  
    rm /tmp/portFile_&TIMESTMP..props  +                                        
     1>>>> /tmp/bbowaddn_&TIMESTMP..out +                                       
     2>>>> /tmp/bbowaddn_&TIMESTMP..err                                         
/*                                                                              
)SEL &ANNOGP. ^= DefaultNodeGroup                                               
//********************************************************************/         
//*  delete jacl file from the HFS (/tmp)                            */         
//********************************************************************/         
//DELETEJ  EXEC PGM=IKJEFT01,REGION=0M                                          
//SYSTSPRT DD  SYSOUT=*                                                         
//SYSTSIN  DD  *                                                                
 BPXBATCH SH +                                                                  
    rm /tmp/createNodeGroup_&TIMESTMP..jacl +                                   
     1>>>> /tmp/bbowaddn_&TIMESTMP..out +                                       
     2>>>> /tmp/bbowaddn_&TIMESTMP..err                                         
/*                                                                              
)ENDSEL                                                                         
//********************************************************************/         
//*  Copy script output back to joblog                               */         
//********************************************************************/         
//BBOWANC  EXEC PGM=IKJEFT01,REGION=0M                                          
//SYSEXEC DD DISP=SHR,DSN=&BBOEXEC                                              
//SYSTSIN  DD *                                                                 
   BBOHFSWR '/tmp/bbowaddn_&TIMESTMP..out'                                      
   BBOHFSWR '/tmp/bbowaddn_&TIMESTMP..err'                                      
//SYSTSPRT DD SYSOUT=*                                                          
//                                                                              
//* ================================================================ */         
//* PROPRIETARY-STATEMENT:                                           */         
//* Licensed Material - Property of IBM                              */         
//*                                                                  */         
//* 5724-I63, 5724-H88, 5655-N01, 5733-W61                           */         
//* (C) Copyright IBM Corp. 1999, 2006                               */         
//* All Rights Reserved                                              */         
//* US Government Users Restricted Rights - Use, duplication or      */         
//* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.*/         
//* ================================================================ */         
//* File Tailored on &ZDATE at &ZTIMEL by &ZUSER                                
)CM                                                                             
)CM ================================================================ */         
)CM  Change Activity:                                                */         
)CM                                                                  */         
)CM    MD16389 H28W500 030402 PDML: initial release.                 */         
)CM    MD16901 H28W500 030423 PDML: add port.                        */         
)CM    MD15371 H28W500 030529 PDML: fix MAX length: replace ASWASH   */         
)CM                                 with CBCONFIG and ASDIRN.        */         
)CM  MD17356.1 H28W500 030625 PDML: add more options.                */         
)CM    MD18078 H28W502 030929 PDML: add time stamp.                  */         
)CM    MD18711 H28W502 031120 PDML: change WAS HOME variables.       */         
)CM    207448  H28W510 040609 PDML: add -nodegroup.                  */         
)CM   219562.1 H28W510 040728 PDML: add portFile, moved all the ports*/         
)CM                                 to portFile.                     */         
)CM   219562.2 H28W510 040826 PDML: change -nodegroup to             */         
)CM                                 -nodegroupname.                  */         
)CM   242273   H28W600 041103 PDML: add createNodeGroup.             */         
)CM   243976   H28W600 111904 PDML: move ANNOGP to it's own line.    */         
)CM   240620   H28W600 111904 PDML: add -includebusses.              */         
)CM   246207   H28W600 120304 PDML: change from -includebusses to    */         
)CM                                 -includebuses.                   */         
)CM   249266   H28W600 011005 PDML: add userid and password to the   */         
)CM                                 createNodeGroup step if security */         
)CM                                 is enabled.                      */         
)CM   269443   H28W602 042805   DB: add -noagent option              */         
)CM   304155   H28W610 090905 PDML: change bbowwpfa to bbowaddn.     */         
)CM   311865   H28W610 100805   DB: use user-entered user/pass       */         
)CM    322806 H28W602 111105    DB: some steps were using >> instead */         
)CM                                 of >>>>                          */         
)CM   334832   H28W602 010406   DB: first write to log should use >> */         
)CM   338132   H28W610 020606 PDML: add SBBGLOAD.                    */
)CM   368111   H28W610 081406   DB: add localusername/localpassword  */        
)CM                                                                  */         
)CM ================================================================ */         
