Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1083061
  • 博文数量: 106
  • 博客积分: 9093
  • 博客等级: 中将
  • 技术积分: 2770
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-01 17:22
文章分类

全部博文(106)

文章存档

2014年(1)

2012年(29)

2011年(32)

2010年(20)

2008年(24)

分类:

2010-03-12 16:08:23

1,创建Data Queue
CRTDTAQ DTAQ(PTRLIB/CBD) MAXLEN(256) SEQ(*KEYED) KEYLEN(3)

2,RPGLE程序
0001.00 D NAME            C                   CONST('GIVE ME FIVE')       
0002.00 D RDATA           DS                                              
0003.00 D  DATA1                  1     20                                
0004.00 C*Send Data Queue Parameter                                       
0005.00 C     SNDPLIST      PLIST                                         
0006.00 C                   PARM                    DTAQ             10   
0007.00 C                   PARM                    LIB              10   
0008.00 C                   PARM                    LEN               5 0 
0009.00 C                   PARM                    DATA            256   
0010.00 C* Optional parameter                                             
0011.00 C                   PARM                    KEYLEN            3 0 
0012.00 C                   PARM                    KEYDATA           3   
0013.00 C*Receive Data Queue Parameter                                    
0014.00 C     RCVPLIST      PLIST                                         
0015.00 C                   PARM                    RDTAQ            10   
0016.00 C                   PARM                    RLIB             10   
0017.00 C                   PARM                    RLEN              5 0 
0018.00 C                   PARM                    RDATA           256        
0019.00 C                   PARM                    WAIT              5 0      
0020.00 C* Optional parameter                                                  
0021.00 C                   PARM                    KORDER            2        
0022.00 C                   PARM                    KLEN              3 0      
0023.00 C                   PARM                    KDATA             3        
0024.00 C                   PARM                    SILEN             3 0      
0025.00 C                   PARM                    SINFO            44        
0026.00 C*Clear Data Queue Parameter                                           
0027.00 C     CLRPLIST      PLIST                                              
0028.00 C                   PARM                    RDTAQ            10        
0029.00 C                   PARM                    RLIB             10        
0030.00 C* Optional parameter                                                  
0031.00 C*                  PARM                    CORDER            2        
0032.00 C*                  PARM                    CLEN              3 0      
0033.00 C*                  PARM                    CDATA             3        
0034.00 C*                  PARM                    ECODE         32767        
0035.00 C* Send Data Queue                                                     
0036.00 C                   MOVEL(P)  'CBD'         DTAQ                       
0037.00 C                   MOVEL(P)  'PTRLIB'      LIB                        
0038.00 C                   Z-ADD     256           LEN                        
0039.00 C                   MOVEL(P)  NAME          DATA                       
0040.00 C                   Z-ADD     3             KEYLEN                     
0041.00 C                   MOVEL(P)  'BCD'         KEYDATA                    
0042.00 C                   CALL      'QSNDDTAQ'    SNDPLIST                   
0043.00 C* Receive Data Queue                                                  
0044.00 C                   MOVEL(P)  'CBD'         RDTAQ                      
0045.00 C                   MOVEL(P)  'PTRLIB'      RLIB                       
0046.00 C                   Z-ADD     256           RLEN                       
0047.00 C                   Z-ADD     1             WAIT                       
0048.00 C                   MOVEL(P)  'EQ'          KORDER                     
0049.00 C                   Z-ADD     3             KLEN                       
0050.00 C                   MOVEL     'BCD'         KDATA                      
0051.00 C                   Z-ADD     44            SILEN                      
0052.00 C                   CALL      'QRCVDTAQ'    RCVPLIST                   
0053.00 C                   IF        RDATA <> *BLANK                          
0054.00 C     DATA1         DSPLY                                              
0055.00 C                   ENDIF                                              
0056.00 C* Clear Data Queue                                                    
0057.00 C                   CALL      'QCLRDTAQ'    CLRPLIST                   
0058.00 C*                                                                     
0059.00 C                   SETON                                            LR
0060.00 C                   RETURN                                             

以上代码仅供参考,欢迎讨论。
阅读(2848) | 评论(0) | 转发(4) |
0

上一篇:用FTP下载source

下一篇:Data Area操作

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