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

 
     
pclarkeirlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.