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

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2010-06-21 12:06:01

CLP
/*-------------------------------------------------------------------*/
/*                                                                   */
/*  Program . . : CBX126V                                            */
/*  Description : Manage journal receiver command - VCP              */
/*  Author  . . : Carsten Flensburg                                  */
/*  Published . : Club Tech iSeries Programming Tips Newsletter      */
/*  Date  . . . : October 28, 2004                                   */
/*                                                                   */
/*  Program function:  Check existence of parameter JRN - Journal    */
/*                                                                   */
/*                                                                   */
/*  Programmer's notes:                                              */
/*    The CPD0006 diagnostic message followed by a CPF0002 escape    */
/*    message is mandatory for a command validity checking program.  */
/*                                                                   */
/*                                                                   */
/*  Compile options:                                                 */
/*    CrtClPgm   Pgm( CBX126V )                                      */
/*               SrcFile( QCLSRC )                                   */
/*               SrcMbr( *PGM )                                      */
/*                                                                   */
/*-------------------------------------------------------------------*/
     Pgm      ( &PxJrnQ           +
                &PxSavOfs         +
                &PxDays           +
                &PxRetain         +
                &PxRcvSts         +
                &PxOption         +
                &PxForce          +
              )

/*-- Parameters:  ---------------------------------------------------*/
     Dcl        &PxJrnQ     *Char    20
     Dcl        &PxSavOfs   *Char    15
     Dcl        &PxDays     *Char     2
     Dcl        &PxRetain   *Char     2
     Dcl        &PxRcvSts   *Char     3
     Dcl        &PxOption   *Char     3
     Dcl        &PxForce    *Char     3

/*-- Global variables:  ---------------------------------------------*/
     Dcl        &JrnNam     *Char    10
     Dcl        &JrnLib     *Char    10

     Dcl        &Msg        *Char    80

/*-- Global error monitoring:  --------------------------------------*/
     MonMsg     CPF0000     *N       GoTo Error

/*-- Mainline -------------------------------------------------------*/


     ChgVar     &JrnNam       %Sst( &PxJrnQ   1  10 )
     ChgVar     &JrnLib       %Sst( &PxJrnQ  11  10 )

     RtvObjD    Obj( &JrnLib/&JrnNam )                +
                ObjType( *JRN )                       +
                RtnLib( &JrnLib )

/*-- End of program -------------------------------------------------*/
Return:
     Return

/*-- Error processor ------------------------------------------------*/
Error:
     RcvMsg     MsgType( *EXCP )                      +
                Msg( &Msg )

     ChgVar     &Msg         ( '0000' *Cat  &Msg )

     SndPgmMsg  MsgId( CPD0006 )                      +
                MsgF( QCPFMSG )                       +
                MsgDta( &Msg )                        +
                MsgType( *DIAG )

     SndPgmMsg  MsgId( CPF0002 )                      +
                MsgF( QCPFMSG )                       +
                MsgType( *ESCAPE )

EndPgm:
     EndPgm
阅读(1230) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~