Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1298616
  • 博文数量: 287
  • 博客积分: 11000
  • 博客等级: 上将
  • 技术积分: 3833
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-16 08:43
文章分类
文章存档

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2010-06-21 17:45:01

.*-----------------------------------------------------------------------**
.*
.*  Compile options:
.*
.*    CrtMnu Menu( PRFAUT )
.*           Type( *UIM )
.*           SrcFile( QMNUSRC )
.*           SrcMbr( CBX129 )
.*           Aut( *USE )
.*
.*-----------------------------------------------------------------------**
:PNLGRP.
.*
:IMPORT PNLGRP='CBX128H'  NAME='OVRGRPPRF'.
:IMPORT PNLGRP='CBX1291H' NAME='ADDPRFAUT'.
:IMPORT PNLGRP='CBX1292H' NAME='MNGPRFAUT'.
:IMPORT PNLGRP='QHWCCMD'  NAME='SIGNOFF'.
.*
:VAR   NAME=ZMENU.
:COND  NAME=OvrOk    EXPR='CHKOBJ("OVRGRPPRF", "*CMD", "*USE")'.
:COND  NAME=AddOk    EXPR='CHKOBJ("ADDPRFAUT", "*CMD", "*USE")'.
:COND  NAME=MngOk    EXPR='CHKOBJ("MNGPRFAUT", "*CMD", "*USE")'.
.*
:KEYL  NAME=SMALL    HELP=FKHLP.
:KEYI  KEY=F1        HELP=F1HLP  ACTION='HELP'.
:KEYI  KEY=F3        HELP=F3HLP  ACTION='EXIT SET'   VARUPD=NO  .F3=Exit
:KEYI  KEY=F4        HELP=F4HLP  ACTION='PROMPT'                .F4=Prompt
:KEYI  KEY=F9        HELP=F9HLP  ACTION='RETRIEVE'              .F9=Retrieve
:KEYI  KEY=F12       HELP=F12HLP ACTION='CANCEL SET' VARUPD=NO  .F12=Cancel
:KEYI  KEY=Enter     HELP=ENHLP  ACTION='ENTER'.
:KEYI  KEY=Help      HELP=HPHLP  ACTION='HELP'.
:KEYI  KEY=Pageup    HELP=PUHLP  ACTION='PAGEUP'.
:KEYI  KEY=Pagedown  HELP=PDHLP  ACTION='PAGEDOWN'.
:KEYI  KEY=Print     HELP=PRHLP  ACTION='PRINT'.
:EKEYL.
.*
:PANEL   NAME=MAIN
         HELP=MAINHLP
         KEYL=SMALL
         PANELID=ZMENU
         TOPSEP=SYSNAM
         ENTER='MSG CPD9817 QCPFMSG'
         .Profile Authorization Menu
:MENU    DEPTH='*'
         SCROLL=YES.
:TOPINST .Select one of the following:
.*
:MENUGRP .Override commands
:MENUI   OPTION=1
         HELP=OP1HLP
         ACTION='CMD ?OVRGRPPRF'
         COND=OvrOk
         .Override group profile                                      OVRGRPPRF
:EMENUGRP.
.*
:MENUGRP .Management commands
:MENUI   OPTION=11
         HELP=OP11HLP
         ACTION='CMD ?ADDPRFAUT'
         COND=AddOk
         .Add profile authorization                                   ADDPRFAUT
:MENUI   OPTION=12
         HELP=OP12HLP
         ACTION='CMD ?MNGPRFAUT'
         COND=MngOk
         .Manage profile authorization                                MNGPRFAUT
:EMENUGRP.
.*
:MENUGRP .Service options
:MENUI   OPTION=90
         HELP=OP90HLP
         ACTION='CMD SIGNOFF'
         .Sign off                                                    SIGNOFF
:EMENUGRP.
:EMENU.
.*
:CMDLINE SIZE=SHORT   .Selection or command
:EPANEL.
.*
:HELP    NAME=MAINHLP .Main help
:P.
The Profile Authorization (PRFAUT) menu allows you to work with the
profile authorization commands.  Only commands to which you have *USE
authority to are displayed.  Contact your security officer to obtain
any missing authorization to the Profile Authorization commands.
:EHELP.
.*
:HELP    NAME=FKHLP   .Function keys
:EHELP.
.*
:HELP    NAME=F1HLP.
:PARML.
:PT.F1=Help
:PD.Shows additional information about the display or option you
selected.
:EPARML.
:EHELP.
.*
:HELP    NAME=F3HLP.
:PARML.
:PT.F3=Exit
:PD.Ends the current task and returns you to the display from which the
task was started.
:EPARML.
:EHELP.
.*
:HELP    NAME=F4HLP.
:PARML.
:PT.F4=Prompt
:PD.Provides assistance in entering or selecting a command.
:EPARML.
:EHELP.
.*
:HELP    NAME=F9HLP.
:PARML.
:PT.F9=Retrieve
:PD.Displays the last command you ran from the command line, and any
parameters you selected.  By pressing this key once, you will see the
last command you ran.  By pressing this key twice, you will see the
next-to-last command that you ran, and so on.
:EPARML.
:EHELP.
.*
:HELP    NAME=F12HLP.
:PARML.
:PT.F12=Cancel
:PD.Returns to the previous menu or display.
:EPARML.
:EHELP.
.*
:HELP    NAME=ENHLP.
:PARML.
:PT.Enter
:PD.Submits information on the display for processing.
:EPARML.
:EHELP.
.*
:HELP    NAME=HPHLP.
:PARML.
:PT.Help
:PD.Shows additional information about the display or option you
selected.
:EPARML.
:EHELP.
.*
:HELP    NAME=PDHLP.
:PARML.
:PT.Page Down (Roll Up)
:PD.Moves forward to show additional messages for this display.
:EPARML.
:EHELP.
.*
:HELP    NAME=PUHLP.
:PARML.
:PT.Page Up (Roll Down)
:PD.Moves backward to show additional messages for this display.
:EPARML.
:EHELP.
.*
:HELP    NAME=PRHLP.
:PARML.
:PT.Print
:PD.Prints information currently shown on the display
:EPARML.
:EHELP.
.*
:HELP    NAME=OP1HLP  .Override group profile
:XH3.Option 1 -- Override group profile
:IMHELP  NAME='OVRGRPPRF'.
:EHELP.
.*
:HELP    NAME=OP11HLP .Add profile authorization
:XH3.Option 11 -- Add profile authorization
:IMHELP  NAME='ADDPRFAUT'.
:EHELP.
.*
:HELP    NAME=OP12HLP .Manage profile authorization
:XH3.Option 12 -- Manage profile authorization
:IMHELP  NAME='MNGPRFAUT'.
:EHELP.
.*
:HELP    NAME=OP90HLP .Sign off
:XH3.Option 90 -- Sign off
:IMHELP  NAME='SIGNOFF'.
:EHELP.
.*
:EPNLGRP.
.*-----------------------------------------------------------------------**
.*
.*  Compile options:
.*
.*    CrtPnlGrp PnlGrp( CBX1291H )
.*              SrcFile( QPNLSRC )
.*              SrcMbr( *PNLGRP )
.*
.*-----------------------------------------------------------------------**
:PNLGRP.
:HELP NAME='ADDPRFAUT'.Add Profile Authorization Code - Help
:P.
The Add Profile Authorization Code (ADDPRFAUT) command registers the
authorization code that is required by the Override Group Profile
(OVRGRPPRF) command to perform a group profile override.
:P.
The authorization code is registered to a specific user profile and
group profile combination, and can only be used by that user profile to
temporarily replace a job's current primary group profile with the
specified group profile.
:P.
At release V5R1 and earlier, any special or object authority coming
from the replaced group profile is suspended during this replacement.
Likewise any object or special authority provided by the new group
profile is activated while the override is in effect.
:P.
:HP2.Restriction&COLON.:EHP2. This command requires *SECADM special
authority to run.
:P.
:HP2.Restriction&COLON.:EHP2. This command can only be run in an
interactive environment.
:P.
:EHELP.
:HELP NAME='ADDPRFAUT/USRPRF'.User profile (USRPRF) - Help
:XH3.User profile (USRPRF)
:P.
The name of the user profile for which the authorization code should be
valid.
:P.
This is a required parameter.
:P.
:EHELP.
:HELP NAME='ADDPRFAUT/GRPPRF'.Group profile (GRPPRF) - Help
:XH3.Group profile (GRPPRF)
:P.
The name of the group profile to which the specified user profile
should be authorized to perform an override to.
:P.
This is a required parameter.
:P.
:EHELP.
:HELP NAME='ADDPRFAUT/AUTCOD'.Authorization code (AUTCOD) - Help
:XH3.Authorization code (AUTCOD)
:P.
Specify the authorization code that must be applied by the OVRGRPPRF
command to approve the override to the specified group profile.
:P.
This is a required parameter.
:P.
:NT.
All letters are by default capitalized by this command.
:ENT.
:P.
:EHELP.
:HELP NAME='ADDPRFAUT/REASON'.Reason (REASON) - Help
:XH3.Reason (REASON)
:P.
Specify the reason for the requested override of current group profile.
:P.
This is a required parameter.
:P.
:EHELP.
:HELP NAME='ADDPRFAUT/VLDTIM'.Valid time (VLDTIM) - Help
:XH3.Valid time (VLDTIM)
:P.
Specify the number of minutes that the authorization code should be
valid.  Once the authorization code has expired it cannot be used again
until it is renewed by this command, specifying RPLAUT(*YES).
:P.
The number of minutes are calculated based on the time the
authorization code was created, as opposed to when it was first used.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.60:EPK.
:PD.
The authorization code expires 60 minutes after creation.
:PT.:PV.valid-time:EPV.
:PD.
Specify the number of minutes that the authorization code should be
available for use.
:EPARML.
:EHELP.
:HELP NAME='ADDPRFAUT/RPLAUT'.Replace authorization code (RPLAUT) - Help
:XH3.Replace authorization code (RPLAUT)
:P.
Specifies whether the authorization code should replace an already
existing authorization code for the specified user profile and group
profile.
:P.
The possible values are:
:P.
:PARML.
:PT.:PK DEF.*NO:EPK.
:PD.
The authorization code does not replace an already existing
authorization code, and an error message is returned, if an
authorization code already exists.
:PT.:PK.*YES:EPK.
:PD.
If an authorization code already exists for the specified user profile
and group profile, it is replaced by this command.
:EPARML.
:EHELP.
:EPNLGRP.
/*-------------------------------------------------------------------*/
/*                                                                   */
/*  Program . . : CBX1291M                                           */
/*  Description : Add profile authorization code - setup             */
/*  Author  . . : Carsten Flensburg                                  */
/*  Published . : Club Tech iSeries Programming Tips Newsletter      */
/*  Date  . . . : January 20, 2005                                   */
/*                                                                   */
/*                                                                   */
/*  Program function:  Compiles, creates and configures all the      */
/*                     ADDPRFAUT 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.                       */
/*                                                                   */
/*  Requirements:      This program must be run by a user profile    */
/*                     having *ALLOBJ special authority.             */
/*                                                                   */
/*                                                                   */
/*  Compile options:                                                 */
/*    CrtClPgm    Pgm( CBX1291M )                                    */
/*                SrcFile( QCLSRC )                                  */
/*                SrcMbr( *PGM )                                     */
/*                                                                   */
/*-------------------------------------------------------------------*/
     Pgm    &UtlLib
     Dcl    &UtlLib         *Char     10
     MonMsg      CPF0000    *N        GoTo Error

     CrtRpgMod   &UtlLib/CBX1291                 +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *NONE )                +
                 Aut( *USE )
     CrtPgm      &UtlLib/CBX1291                 +
                 Module( &UtlLib/CBX1291 )       +
                 ActGrp( *NEW )                  +
                 UsrPrf( *OWNER )                +
                 Aut( *USE )
     ChgObjOwn   Obj( &UtlLib/CBX1291 )          +
                 ObjType( *PGM )                 +
                 NewOwn( QSECOFR )
     ChgPgm      Pgm( &UtlLib/CBX1291 )          +
                 RmvObs( *ALL )
     CrtRpgMod   &UtlLib/CBX1291V                +
                 SrcFile( &UtlLib/QRPGLESRC )    +
                 SrcMbr( *Module )               +
                 DbgView( *NONE )                +
                 Aut( *USE )
     CrtPgm      &UtlLib/CBX1291V                +
                 Module( &UtlLib/CBX1291V )      +
                 ActGrp( *NEW )                  +
                 UsrPrf( *OWNER )                +
                 Aut( *USE )
     ChgObjOwn   Obj( &UtlLib/CBX1291V )         +
                 ObjType( *PGM )                 +
                 NewOwn( QSECOFR )
     ChgPgm      Pgm( &UtlLib/CBX1291V )         +
                 RmvObs( *ALL )
     CrtPnlGrp   &UtlLib/CBX1291H                +
                 SrcFile( &UtlLib/QPNLSRC )      +
                 SrcMbr( *PNLGRP )
     CrtCmd      Cmd( &UtlLib/ADDPRFAUT )        +
                 Pgm( CBX1291 )                  +
                 SrcFile( &UtlLib/QCMDSRC )      +
                 SrcMbr( CBX1291X )              +
                 VldCkr( CBX1291V )              +
                 Allow( *INTERACT )              +
                 HlpPnlGrp( CBX1291H )           +
                 HlpId( *CMD )                   +
                 Aut( *EXCLUDE )
     RmvMsg      Clear( *ALL )
     SndPgmMsg   Msg( 'Command ADDPRFAUT has been'       *Bcat  +
                      'successfully created in library'  *Bcat  +
                      &UtlLib                            *Tcat  +
                      '.' )                                     +
                 MsgType( *COMP )
     Return
/*-- Error handling:  -----------------------------------------------*/
 Error:
     Call        QMHMOVPM    ( '    '                 +
                               '*DIAG'                +
                               x'00000001'            +
                               '*PGMBDY'              +
                               x'00000001'            +
                               x'0000000800000000'    +
                             )
     Call        QMHRSNEM    ( '    '                 +
                               x'0000000800000000'    +
                             )
 EndPgm:
     EndPgm
阅读(2131) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~