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

2013年(15)

2012年(17)

2011年(17)

2010年(135)

2009年(85)

2008年(18)

分类: 系统运维

2010-06-11 10:52:36

 
 
 
 * The prototype:
D SndPgmMsg       pr                  extpgm('QMHSNDPM')
D  MsgID                         7a   Const
D  MsgFName                     20a   Const
D  MsgDta                    32767a   Const Options(*Varsize)
D  MsgDtaLength                  9b 0 Const
D  MsgType                      10a   Const
D  CallStackE                   10a   Const Options(*Varsize)
D  CallStackC                    9b 0 Const
D  MsgKey                        4a
D  Error                     32767a         Options(*Varsize)
*  Optional Parameter Group 1
D  CallStackEL                   9b 0 Const Options(*Nopass)
D  CallStackEQ                  20a   Const Options(*Nopass)
D  DspPgmMsgWait                 9b 0 Const Options(*Nopass)
*  Optional Parameter Group 2
D  CallStackEDT                 10a   Const Options(*Nopass)
D  MsgCCSID                      9b 0 Const Options(*Nopass)

* Procedure for sending:
P SndMsgErr       b                   export
D*
D SndMsgErr       pi
D  MsgID                         7a   Const
D* PgmMsgQ                      10a   Const
D  MsgDta                    32767a   Const Options(*Varsize : *Nopass)
D  MsgDtaLen                     9b 0 Const Options(*Nopass)
D*
D  PgmMsgDta      s                   like(MsgDta)
D  PgmDtaLen      s                   like(MsgDtaLen)
D  MsgKeyA        s              4a
D* PgmCllStck     s             10a   inz('*')
D  PgmCllStck     s             10a   inz(*blanks)
D  PgmCllStckC    s              9b 0 inz(0)
D  CallStackEL    s              9b 0 inz(10)
D  CallStackEQ    s             20a   inz('*NONE')
D  DspPgmMsgWait  s              9b 0 inz(*zeros)
D  CallStackEDT   s             10a   inz('*CHAR')
D  MsgCCSID       s              9b 0 inz(0)
*
C                   reset                   errc0100
* This contains the name of program invoking the Procedure
C                   eval      PgmCllStck = ZZPgmofProc
*  This is used when defining the PGMMSGQ for DSPF
C                   if        %parms = 1
C                   eval      PgmMsgDta = *blanks
C                   eval      PgmDtaLen = *zeros
C                   else
C                   eval      PgmMsgDta = MsgDta
C                   eval      PgmDtaLen = MsgDtaLen
C                   endif
C                   callp     SndPgmMsg(MsgId:
* Named constant, can be replaced
C                                       DwhMsg: 
C                                       PgmMsgDta:
C                                       PgmDtaLen:
C                                       msgtypinfo:
C                                       PgmCllStck:
C                                       PgmCllStckC:
C                                       MsgKeyA:
C                                       errc0100)
C                   return
P SndMsgErr       e

*The System Data Structure;
Dpsds            sds
D ZZProcName                    10a
D ZZStatus                       5s 0
D ZZPrevSts                      5s 0
D ZZSrcLneNbr                    8a
D ZZRoutine                      8a
D ZZParms                        3s 0
D ZZExcType                      3a
D ZZExcNbr                       4a
D ZZReserve1                     4a
D ZZMsgWrkAra                   30a
D ZZPgmLib                      10a
D ZZExcDta                      80a
D ZZ9001ID                       4a
D ZZLastFile1                   10a
D ZZUnused1                      6a
D ZZJobDate                      8a
D ZZCentury                      2s 0
D ZZLastFile2                    8a
D ZZFileSts                     35a
D ZZJobName                     10a
D ZZUserID                      10a
D ZZJobNbr                       6s 0
D ZZJobRunDte                    6s 0
D ZZSysDate                      6s 0
D ZZSysTime                      6s 0
D ZZCompDate                     6
D ZZCompTime                     6
D ZZCompLvl                      4a
D ZZSrcFileName                 10a
D ZZSrcFileLib                  10a
D ZZSrcFileMbr                  10a
D ZZPgmOfProc                   10a
D ZZModOfProc                   10a
D ZZSid2128                      2s 0
D ZZSid228235                    2s 0
D ZZCurrentUser                 10a
D ZZUnused2                     62a

In the program which wants to send a message, a simple CALLP works as
C               callp   SndMsgErr('CPF9898':MsgDta:%size(MsgDta))

Thanks to John C. Boblitz Jr.
阅读(973) | 评论(0) | 转发(0) |
0

上一篇:QMHRCVPM (rpgle)

下一篇:QCDRCMDD (rpgle)

给主人留下些什么吧!~~