Following is an example of ILE RPG calling the QSNDDTAQ and the QRCVDTAQ API.Note: Ensure the data queue is created using the CRTDTAQcommand. For example:CRTDTAQ DTAQ(LIBRARYNAME/DATAQUEUENAME) MAXLEN(50) ddqname s 10A INZ('DATAQUEUENAME')
ddqlib s 10A INZ('LIBRARYNAME')
ddqsndlen s 5 0 INZ(14)
ddqlen s 5 0
ddqsnddata s 50a
ddqdata s 50a
ddqwait s 5 0 INZ(0)
c eval dqsnddata = 'This is a test'
c call 'QSNDDTAQ'
c parm dqname
c parm dqlib
c parm dqsndlen
c parm dqsnddata
c call 'QRCVDTAQ'
c parm dqname
c parm dqlib
c parm dqlen
c parm dqdata
c parm dqwait
c dqdata dsply
c seton lr
还可以这么学习,太棒了
阅读(2329) | 评论(0) | 转发(0) |