Subfile Messages

Posted on 2004-11-04
Last Modified: 2008-02-01
I have a display which utilises Subfile messages to place messages on line 24 of the display. However I am fighting for space and need to utilize line 24 for a list of available function keys. Unfortunately when I do this I loose my subfile messages.

here is a DDS snippit:

A            VDL24         75A  O 24  4TEXT('Line 24 Text          
A                                                OVRATR                      
A                                                OVRDTA                      
A                                                DSPATR(HI)                  
A   93                                          DSPATR(RI)                  
A N02                                         COLOR(BLU)                  
A   02                                         COLOR(YLW)                  
A          R MSGSFL                      SFL                        
A                                               SFLMSGRCD(24)              
A            @MSGKY                      SFLMSGKEY                  
A            @PGMQ                       SFLPGMQ                    
A          R MSGCTL                     SFLCTL(MSGSFL)              
A                                              SFLSIZ(0020)                
A                                              SFLPAG(0001)          
A                                              OVERLAY      
A                                              SFLINZ        
A                                              SFLDSP        
A                                              SFLDSPCTL    
A N88                                        SFLEND        
A            @PGMQ                       SFLPGMQ  

Is there a simple way that line 24 can be shared by the constant Text (VDL24) and the error message subfile. When errors exist then they would be displayed on line 24 else the text line VDL24 would be displayed.

Appreciate your help

pat clarke

Question by:pclarkeirl
    LVL 14

    Expert Comment

    Hi Pat
    do you want the full functionallity of the message subfile(ie pressing help to get the second level help) or just a work around.

    LVL 14

    Assisted Solution

    A simple way is:
     A          R LINE24                    CLRL(*NO) OVERLAY          
     A                                 24 49'Text on Line 24'          

    write this after the SFLMSFCTL format and you can see the sflmsg and the text. You can still hit help on the message to get 2nd level but you loose the text if you scroll through the messages.


    Author Comment

    Hi dave,
    that works thanks.

    I have taken a variation of your example and conditioned LINE24 with error indicator *IN93. This means that the full text is available when no error exists and when an error condition exists the error message is displayed in its place. I am happy with the solution however just one more question on the subject.

    Is it possible to control the output of the MSG subfile. For example to dispay the error message in Red or Underline the message ??

    thanks for your help
    LVL 14

    Expert Comment

    the only way that I have done that is by putting the hex code in the first byte of the message.



    Author Comment

    Hi Dave,
    If I were dealing with a string then I can understand how to apply a hex code prior to the text. for example:

    BITON'247'        $HEX29

    I could then move $HEX29 to the 1st character of the string.

    However how can I apply this hex code to the begining of a text field in a message file ?


    LVL 14

    Accepted Solution

    this is the type of CL program that I use

                 PGM        PARM(&MSGF &MSG)                                
                 DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10)                  
                 DCL        VAR(&MSG) TYPE(*CHAR) LEN(10)                  
                 DCL        VAR(&TXT) TYPE(*CHAR) LEN(80)                  
                 DCL        VAR(&RED) TYPE(*CHAR) LEN(1) VALUE(X'29')      
                 RTVMSG     MSGID(&MSG) MSGF(&MSGF) MSG(&TXT)              
                 CHGVAR     VAR(&TXT) VALUE(&RED *CAT &TXT)                
                 CHGMSGD    MSGID(&MSG) MSGF(&MSGF) MSG(&TXT)              


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now