ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Message Subfile in a Window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message Subfile in a Window

    Hi All,

    Is it possible to use a message subfile to display error messages in a windowed subfile screen? I got a scenario where i have to display error messages with length 256 chars but the windowed program can display only 50 chars and i have only one line available for the error message.

    I tried using one but it doesnt print the message on the screen when i tried to do so. i used line number 22 for the error display as below. And i would want to start the message at column 8 of the 22nd line.

    A SFLMSGRCD(22)

    Any suggestions to get this done?

    Thanks,
    Neo

  • #2
    Re: Message Subfile in a Window

    Just like a normal window with a few minor changes. Make sure your window definition specifies, no message line (counter intuitive) and that the control spec for your message subfile references the window.

    Like so...

    Code:
    A          R WINDOWEDGE                                              
    A                                      WINDOW(6 7  9 64 *NOMSGLIN)   
    A                                      WDWTITLE((*TEXT &WINTITLE) +  
    A                                               (*COLOR WHT) +       
    A                                                *TOP *CENTER)       
    A            WINTITLE      40A  P                                    
    A          R WINDOW                                                  
           
    A                                      WINDOW(WINDOWEDGE)            
    A                                      OVERLAY                       A                                  2  3'Data Queue:'        
    A                                      COLOR(BLU)           
    A            WINDATAQ      10   O  2 15                     A                                  8  3'F3=Exit'            
    A                                      COLOR(BLU)           
    A                                  8 13'F12=Cancel'         
    A                                      COLOR(BLU)           
    A          R WINSFLMSG                 SFL                  
    A                                      SFLMSGRCD(9)         
    A            MSGKEY                    SFLMSGKEY            
    A            PROGRAM                   SFLPGMQ(10)          
    A          R WINCTLMSG                 SFLCTL(WINSFLMSG)    
    A                                      WINDOW(WINDOWEDGE)   
    A                                      SFLSIZ(0010)         
    A                                      SFLPAG(0001)         
    A                                      OVERLAY              
    A  99                                  SFLDSP               
    A  99                                  SFLDSPCTL            
    A  99                                  SFLINZ               
    A            PROGRAM                   SFLPGMQ(10)
    Note the SFLMSGRCD keyword. It should reference the last line in your window.. not the last line on the screen.

    I may have misunderstood your intent after going back and rereading... just let me know.
    Last edited by soup_dog; January 20, 2009, 02:18 PM.

    Comment

    Working...
    X