消息子文件不显示



我编写了一个简单的程序,它使用消息子文件。但是,消息不会显示。你能看看代码和帮助吗?

.DDS:

        A                                      DSPSIZ(24 80 *DS3)                       
        A                                      CA03(03)                                 
        A                                      CA12(12)                                 
        A                                      INDARA                                   
        A* ===========================================================                  
        A          R SCREEN1                                                            
        A                                  1 73DATE                                     
        A                                      EDTCDE(Y)                                
        A                                  2 73TIME                                     
        A                                  1  5USER                                     
        A                                  1 29'Message SubFile Example'                
        A                                      COLOR(WHT)                               
        A                                  5  6'Type a first Name and a last Name -     
        A                                      and Press Enter to test'                 
        A                                      COLOR(BLU)                               
        A                                  8  8'Enter First Name..........'             
        A            FIRST_NAME    20A  B  8 35CHECK(LC)                                
        A                                      EDTCDE(Y)                                   
        A                                  2 73TIME                                        
        A                                  1  5USER                                        
        A                                  1 29'Message SubFile Example'                   
        A                                      COLOR(WHT)                                  
        A                                  5  6'Type a first Name and a last Name -        
        A                                      and Press Enter to test'                    
        A                                      COLOR(BLU)                                  
        A                                  8  8'Enter First Name..........'                
        A            FIRST_NAME    20A  B  8 35CHECK(LC)                                   
        A                                 10  8'Enter'                                     
        A                                 10 14'Last'                                      
        A                                 10 19'Name...........'                           
        A            LAST_NAME     20A  B 10 35CHECK(LC)                                   
        A*                                22  3'F3=Exit'                                   
        A*                                     COLOR(BLU)                                  
        A*                                22 13'F12=Cancel'                                
        A*                                     COLOR(BLU)                                  
        A                                  2  5'*sys'                                      
        A* ===========================================================                  
        A          R MSGSBFL                   SFL                        
        A                                      SFLMSGRCD(22)              
        A            MSGKEY                    SFLMSGKEY                  
        A            SDS_PROC                  SFLPGMQ(10)                
        A* ===========================================================                  
        A          R MSGSBCTL                  SFLCTL(MSGSBFL)            
        A                                      SFLSIZ(0002)               
        A                                      SFLPAG(0001)               
        A                                      SFLDSP                     
        A                                      SFLDSPCTL 
        A            SDS_PROC                  SFLPGMQ(10)            

角色扮演代码:

    FMSGSBFL1  CF   E             WorkStn INDDS(INDDS)                 
    DINDDS            DS                                               
    DEXIT                     3      3N                                
    DCANCEL                  12     12N                                
    DPSDS            SDS                                               
    D SDS_PROC                1     10                                 
    DMsgId            S              7A                                
    DMsgLoc           S             20A   Inz('SFLMSGF   *LIBL     ')  
    DMsgRplDta        S              1A   Inz(' ')                     
    DMsgRplDtaLen     S              4B 0 Inz(0)                       
    DMsgType          S             10A   Inz('*DIAG')                 
    DMsgQueue         S            276A   Inz('*')                     
    DMsgCallStack     S              4B 0 Inz(0)                       
    DMsgKey           S              4A   Inz(' ')                     
    DMsgErr           S              4B 0 Inz(0)                       
    DMsgrmv           S             10A   INZ('*ALL')                  
    DMsgId            S              7A                                  
    DMsgLoc           S             20A   Inz('SFLMSGF   *LIBL     ')    
    DMsgRplDta        S              1A   Inz(' ')                       
    DMsgRplDtaLen     S              4B 0 Inz(0)                         
    DMsgType          S             10A   Inz('*DIAG')                   
    DMsgQueue         S            276A   Inz('*')                       
    DMsgCallStack     S              4B 0 Inz(0)                         
    DMsgKey           S              4A   Inz(' ')                       
    DMsgErr           S              4B 0 Inz(0)                         
    DMsgrmv           S             10A   INZ('*ALL')                    

     /Free                                                        
       DoU Exit or Cancel;                                        
         Write Msgsbctl;                                          
         Exfmt Screen1;                                           
         MsgKey = *Blanks;                                        
         Exsr RcvMsg;                                             
         If First_Name <> 'Thejwal';                              
           MsgId = 'SFL0001';                                     
           Exsr SndMsg;                                           
         EndIf;                                                   
         If Last_Name <> 'Pavithran';                             
           MsgId = 'SFL0002';                                     
           Exsr SndMsg;                                           
         EndIf;                                                   

       EndDo;                                                   
       *Inlr = *on;                                             
    C     SndMsg        Begsr                                 
    C                   CALL      'QMHSNDPM'                  
    C                   PARM                    MsgId         
    C                   PARM                    MsgLoc        
    C                   PARM                    MsgRplDta     
    C                   PARM                    MsgRplDtaLen  
    C                   PARM                    MsgType       
    C                   PARM                    MsgQueue      
    C                   PARM                    MsgCallStack  
    C                   PARM                    MsgKey        
    C                   PARM                    MsgErr        
    C                   Endsr                                 
    C     RcvMsg        Begsr                                  
    C                   CALL      'QMHRMVPM'                   
    C                   PARM                    MsgQueue       
    C                   PARM                    MsgCallStack   
    C                   PARM                    MsgKey         
    C                   PARM                    MsgRmv         
    C                   PARM                    MsgErr         
    C                   Endsr                                  

我可以看到消息显示在作业日志中,但由于某种原因它没有显示在屏幕上。我不确定DDS是否有故障,或者消息是否未发送到正确的程序队列。请帮忙

我得到了答案!!问题是我错过了 Screen1 记录格式的覆盖关键字。真是如释重负:)

相关内容

  • 没有找到相关文章

最新更新