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

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2010-06-11 10:54:52

QCDRCMDD (rpgle)
 
 
Here's a sample program you can place in debug and have a look at the API output:


     **-- API Error Data Structure:  -----------------------------------------**
     D ApiError        Ds
     D  AeBytPro                     10i 0 Inz(%Size(ApiError))
     D  AeBytAvl                     10i 0
     D                                1a
     D  AeExcpId                      7a
     D  AeExcpDta                   126a
     **-- Global variables:  -------------------------------------------------**
     D OutStrLenRt     s             10i 0
     D NotSup          s             10i 0
     D FB              s             10i 0 Dim( 3 )
     **-- Command return variable:  ------------------------------------------**
     D CdCmdd0100      Ds
     D  CdBytRtn                     10i 0
     D  CdBytAvl                     10i 0
     D  CdCmdXml                  10240a
     **-- Retrieve Command Text:  --------------------------------------------**
     D RtvCmdTxt       Pr                  ExtPgm( 'QCDRCMDD' )
     D  RcCmdNamQ                    20a   Const
     D  RcDst                        10i 0 Const
     D  RcDstFmt                      8a   Const
     D  RcRcvVar                  32767a         Options( *VarSize )
     D  RcRcvFmt                      8a   Const
     D  RcError                   32767a         Options( *VarSize )
     **-- Convert String: ----------------------------------------------------**
     D CvtString       Pr                  ExtPgm( 'QTQCVRT' )
     D  CsInpCcsId                   10i 0 Const
     D  CsInpStrTyp                  10i 0 Const
     D  CsInpStr                  32767a   Const Options( *VarSize )
     D  CsInpStrSiz                  10i 0 Const
     D  CsOutCcsId                   10i 0 Const
     D  CsOutStrTyp                  10i 0 Const
     D  CsOutCvtAlt                  10i 0 Const
     D  CsOutStrSiz                  10i 0 Const
     D  CsOutStr                  32767a         Options( *VarSize )
     D  CsOutStrLenRt                10i 0
     D  CsNotSup                     10i 0
     D  CsFB                         10i 0 Dim( 3 )
     **
     **-- Mainline:  ---------------------------------------------------------**
     **
     C                   CallP     RtvCmdTxt( 'WRKJOB    QSYS      '
     C                                      : %Size( CdCmdd0100 )
     C                                      : 'DEST0100'
     C                                      : CdCmdd0100
     C                                      : 'CMDD0100'
     C                                      : ApiError
     C                                      )
     **
     C                   CallP     CvtString( 1208
     C                                      : 0
     C                                      : CdCmdXml
     C                                      : CdBytRtn
     C                                      : 37
     C                                      : 0
     C                                      : 0
     C                                      : CdBytRtn
     C                                      : CdCmdXml
     C                                      : OutStrLenRt
     C                                      : NotSup
     C                                      : FB
     C                                      )
     **
     C                   Return

Thanks to Carsten Flensburg
阅读(1083) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~