/*-------------------------------------------------------------------*/
/*                                                                   */
/*  Program . . : CBX3021M                                           */
/*  Description : Work with Workload Capping Groups - Create command */
/*  Author  . . : Carsten Flensburg                                  */
/*                                                                   */
/*                                                                   */
/*  Program function:  Compiles, creates and configures all the      */
/*                     Work with Workload Capping Groups objects.    */
/*                                                                   */
/*                     This program expects a single parameter       */
/*                     specifying the library to contain the         */
/*                     command objects.                              */
/*                                                                   */
/*                     Object sources must exist in the respective   */
/*                     source type default source files in the       */
/*                     command object library.                       */
/*                                                                   */
/*                                                                   */
/*  Compile options:                                                 */
/*    CrtClPgm    Pgm( CBX3021M )                                    */
/*                SrcFile( QCLSRC )                                  */
/*                SrcMbr( *PGM )                                     */
/*                                                                   */
/*-------------------------------------------------------------------*/
     Pgm    &UtlLib

     Dcl    &UtlLib         *Char     10

     MonMsg      CPF0000    *N        GoTo Error



     CrtRpgMod   &UtlLib/CBX3021                 +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *LIST )

     CrtPgm      &UtlLib/CBX3021                 +
                 Module( &UtlLib/CBX3021 )       +
                 ActGrp( *NEW )


     CrtRpgMod   &UtlLib/CBX3021E                +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *LIST )

     CrtPgm      &UtlLib/CBX3021E                +
                 Module( &UtlLib/CBX3021E )      +
                 ActGrp( *CALLER )


     CrtRpgMod   &UtlLib/CBX3021C                +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *LIST )

     CrtPgm      &UtlLib/CBX3021C                +
                 Module( &UtlLib/CBX3021C )      +
                 ActGrp( *CALLER )


     CrtRpgMod   &UtlLib/CBX3021V                +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *LIST )

     CrtPgm      &UtlLib/CBX3021V                +
                 Module( &UtlLib/CBX3021V )      +
                 ActGrp( *NEW )


     CrtPnlGrp   &UtlLib/CBX3021H                +
                 SrcFile( &UtlLib/QPNLSRC )      +
                 SrcMbr( *PNLGRP )

     CrtPnlGrp   &UtlLib/CBX3021P                +
                 SrcFile( &UtlLib/QPNLSRC )      +
                 SrcMbr( *PNLGRP )


     CrtCmd      Cmd( &UtlLib/WRKWLCGRP )                       +
                 Pgm( CBX3021 )                                 +
                 SrcFile( &UtlLib/QCMDSRC )                     +
                 SrcMbr( CBX3021X )                             +
                 VldCkr( CBX3021V )                             +
                 Allow( *INTERACT *IPGM *IREXX *IMOD )          +
                 AlwLmtUsr( *NO )                               +
                 HlpPnlGrp( CBX3021H )                          +
                 HlpId( *CMD )


     SndPgmMsg   Msg( 'Work with Workload Capping Groups command' *Bcat  +
                      'successfully created in library'           *Bcat  +
                      &UtlLib                                     *Tcat  +
                      '.' )                                              +
                 MsgType( *COMP )


     Call        QMHMOVPM    ( '    '                 +
                               '*COMP'                +
                               x'00000001'            +
                               '*PGMBDY'              +
                               x'00000001'            +
                               x'0000000800000000'    +
                             )

     RmvMsg      Clear( *ALL )

     Return

/*-- Error handling:  -----------------------------------------------*/
 Error:
     Call        QMHMOVPM    ( '    '                 +
                               '*DIAG'                +
                               x'00000001'            +
                               '*PGMBDY'              +
                               x'00000001'            +
                               x'0000000800000000'    +
                             )

     Call        QMHRSNEM    ( '    '                 +
                               x'0000000800000000'    +
                             )

 EndPgm:
     EndPgm
