/*-------------------------------------------------------------------*/
/*                                                                   */
/*  Program . . : CBX301M                                            */
/*  Description : Display Job Workload Group - Create command        */
/*  Author  . . : Carsten Flensburg                                  */
/*                                                                   */
/*                                                                   */
/*  Program function:  Compiles, creates and configures all the      */
/*                     Display Job Workload Group command 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( CBX301M )                                     */
/*                SrcFile( QCLSRC )                                  */
/*                SrcMbr( *PGM )                                     */
/*                                                                   */
/*-------------------------------------------------------------------*/
     Pgm    &UtlLib

     Dcl    &UtlLib         *Char     10

     MonMsg      CPF0000    *N        GoTo Error


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

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


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


     CrtCmd      Cmd( &UtlLib/DSPJOBWLG )        +
                 Pgm( CBX301 )                   +
                 SrcFile( &UtlLib/QCMDSRC )      +
                 SrcMbr( CBX301X )               +
                 AlwLmtUsr( *NO )                +
                 HlpPnlGrp( CBX301H )            +
                 HlpId( *CMD )


     SndPgmMsg   Msg( 'Display Job Workload Group command' *Bcat +
                      'successfully created in library'    *Bcat +
                      &UtlLib                              *Tcat +
                      '.' )                                      +
                 MsgType( *COMP )

     CrtMnu      Menu( &UtlLib/CMDWLC )          +
                 Type( *UIM )                    +
                 SrcFile( &UtlLib/QMNUSRC )      +
                 SrcMbr( CBX301U )               +
                 Aut( *USE )

     SndPgmMsg   Msg( 'Workload Capping Group Commands'      *Bcat +
                      'menu 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
