/*-------------------------------------------------------------------*/
/*                                                                   */
/*  Program . . :  SEC105M                                           */
/*  Description :  Work with User Auditing - Create Command          */
/*  Author  . . :  Carsten Flensburg                                 */
/*                                                                   */
/*                                                                   */
/*  Program function:  Compiles, creates and configures all the      */
/*                     Work with User Auditing 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( SEC105M )                                     */
/*                SrcFile( QCLSRC )                                  */
/*                SrcMbr( *PGM )                                     */
/*                                                                   */
/*-------------------------------------------------------------------*/
     Pgm    &UtlLib

     Dcl    &UtlLib         *Char     10

     MonMsg      CPF0000    *N        GoTo Error


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

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


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

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


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

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


     CrtCmd      Cmd( &UtlLib/WRKUSRAUD )                       +
                 Pgm( SEC105 )                                  +
                 SrcFile( &UtlLib/QCMDSRC )                     +
                 SrcMbr( SEC105X )                              +
                 VldCkr( SEC105V )                              +
                 AlwLmtUsr( *NO )                               +
                 HlpPnlGrp( SEC105H )                           +
                 HlpId( *CMD )                                  +
                 PrdLib( &UtlLib )                              +
                 Aut( *EXCLUDE )


     SndPgmMsg   Msg( 'Work with User Auditing 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
