Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Subfile Messages

Hi,
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                                                                  
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

 
     
0
pclarkeirl
Asked:
pclarkeirl
  • 4
  • 2
2 Solutions
 
daveslaterCommented:
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.

Dave
0
 
daveslaterCommented:
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.

Dave
0
 
pclarkeirlAuthor Commented:
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
 
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

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

Dave

0
 
pclarkeirlAuthor Commented:
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:

BITOF'01234567'$HEX29
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 ?

regards

Pat
 
0
 
daveslaterCommented:
Hi
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)              
                                                                       
                                                                       
             ENDPGM                                                    

Dave
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now