Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1025811
  • 博文数量: 125
  • 博客积分: 10490
  • 博客等级: 上将
  • 技术积分: 2386
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-03 18:26
文章分类

全部博文(125)

文章存档

2011年(1)

2010年(9)

2009年(17)

2008年(98)

分类:

2009-05-04 11:03:12

在dspf文件中可以使用以下的两中方法来显示msg信息:
1.直接使用字段级关键字MSGID(msg_前三位代码 msg_后四位代码 msgfile);
2.使用msgsubfile来显示msg信息;
这两种方法各有所长,使用第一种情况方便但是它只能显示当msg信息的前80位(除非定义多个行),而第二中比较麻烦,需要使用到qmhsndpm或sndpgmmsg,但是这种方法能将msg信息都显示出来,因为这种方式使用的是subfile的方法.
 
例子1:
dsp1:
0001.00      A          R DSP                                                
0001.01      A            MSGID          4A  H                               
0001.02      A                                 22  2'F3=EXIT'                
0001.03      A                                      COLOR(BLU)               
0001.04      A                                 22 20'F5=REFRESH'             
0001.05      A                                      COLOR(BLU)               
0001.06      A                                 22 31'F6=CREATE'              
0001.07      A                                      COLOR(BLU)               
0001.08      A                                 22 41'F7=REFER NAME '         
0001.09      A                                      COLOR(BLU)               
0001.10      A                                 22 56'F9=CURSOR'              
0001.11      A                                      COLOR(BLU)               
0001.12      A            MSG           70A  O 24  3MSGID(MSG &MSGID qcpfmsg)
.....
 
例子2:
dspf2
A*%%TS  SD  20090504  103832              REL-V5R3M0  5722-WDS  
A*%%EC                                                          
A                                      DSPSIZ(24 80 *DS3)       
A          R MSF                       SFL                      
A*%%TS  SD  20090504  103832              REL-V5R3M0  5722-WDS  
A                                      SFLMSGRCD(24)            
A            KEY                       SFLMSGKEY                
A            PGMQ                      SFLPGMQ(10)              
A          R MSFC                      SFLCTL(MSF)              
A                                      TEXT('y')                
A                                      SFLDSP                   
A                                      SFLDSPCTL                
A                                      SFLINZ                   
A N04                                  SFLEND                   
A                                      SFLSIZ(0002)             
A                                      SFLPAG(0001)             
A            PGMQ                      SFLPGMQ(10)              
使用qmhsndpm的程序:
D                 DS                                                                             
D stck                    1      4B 0                                                            
D LEN                     5      8B 0                                                            
D ERR                     9     12B 0                                                            
D                                                                                                
D                                                                                                
c                                                                                                
c     *entry        plist
c                   parm                    msgid             7
**msgfile_libname+msgfile
c                   parm                    msgfile          20           
c                   parm                    PGM              10
c*             
c                   movel     '*DIAG'       @TYPE            10 
c                   MOVEL     '*LIBL'       @LIB             10            
c                   MOVE      @LIB          MSGF  
c                   MOVEL     ' '           KEY               4         
c                   MOVEL     ' '           DTA             100
C*                                                                                               
C                   CALL      'QMHSNDPM'                         
C                   PARM                    MSGID       
C                   PARM                    MSGFILE     
C                   PARM                    DTA         
C                   PARM                    LEN         
c                   parm                    type        
C                   parm                    pgm         
c                   parm                    stck        
c                   parm                    key         
c                   parm                    err         

c                   eval      *inlr = '1'               
注: 有问题的地方请大侠指正.谢谢
阅读(2333) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~