QMHRCVPM (rpgle)
* System API error code
D Qusec DS
D QusBPrv 1 4B 0
D QusBAvl 5 8B 0
D Qusei 9 15
D Quserved 16 16
* Type definition for the RCVM0200 format
D RCVM0200 DS 120
D Program 111 120
*Program message parameters
D Pm_MsgId S 7 Inz(*Blanks)
D Pm_MsgF S 20 Inz(*Blanks)
D Pm_MsgDta S 12 Inz('Who are you')
D Pm_Length S 9B 0
D Pm_MType S 10 Inz('*INFO')
D Pm_MKey S 4 Inz(*Blanks)
D Pm_CSEntry S 10 Inz('*')
D Pm_Counter S 9B 0 Inz(4)
D Pm_Format S 8 Inz('RCVM0200')
D Pm_Wait S 9B 0 Inz(0)
D Pm_Action S 10 Inz('*REMOVE')
C *Entry Plist
C Parm Caller 10
* Set error code structure not to use exceptions
C Z-add 16 QusBPrv
* Set length of message data
C Z-add 12 Pm_Length
* Send program message
C Call 'QMHSNDPM'
C Parm Pm_MsgId
C Parm Pm_MsgF
C Parm Pm_MsgDta
C Parm Pm_Length
C Parm Pm_MType
C Parm Pm_CSEntry
C Parm Pm_Counter
C Parm Pm_MKey
C Parm Qusec
* Check for errors
C If QusBAvl > 0
C ExSR *PSSR
C EndIF
* Clear return data astructure
C Clear RCVM0200
* Set Length of message information
C Z-add 120 Pm_Length
* Recieve program message
C Call 'QMHRCVPM'
C Parm RCVM0200
C Parm Pm_Length
C Parm Pm_Format
C Parm Pm_CSEntry
C Parm Pm_Counter
C Parm Pm_MType
C Parm Pm_MKey
C Parm Pm_Wait
C Parm Pm_Action
C Parm Qusec
* Check for errors
C If QusBAvl > 0
C ExSR *PSSR
C EndIF
C Move Program Caller
C Return
C *PSSR BegSR
C Return
C EndSR
阅读(831) | 评论(0) | 转发(0) |