Problem solve Get help with specific problems with your technologies, process and projects.

Sending sub-file error messages of a program message queue to a window

How do I send sub-file error messages of a program message queue to a window? Actually, the messages go to the default line and column number. Example: 24 row and column instead of the bottom line of the window.

Here is an example of how it should be done:

The error message sub-file is standard, but there are two changes to it. The first one is the SFLMSGRCD key word. It is usually left at 24. In this case, it has been moved to 16. It should be adjusted properly to take into account the position and size of the window. The second one is the WINDOW key word. This is to base the message sub-file on the window you want it to be part of.

A         R SFLRECQ                       SFL 
A                                         TEXT('Error messages subfile') 
A                                         SFLMSGRCD(16) 
A            ?MSGKY                    SFLMSGKEY 
A            ?PGMQ                       SFLPGMQ(10) 
A          R SFLCTLQ                     SFLCTL(SFLRECQ) 
A                                         TEXT('Error messages subfile') 
A                                         OVERLAY 
A N27                                 SFLDSP 
A N27                                 SFLDSPCTL 
A                                         SFLINZ 
A  27                                   SFLCLR 
A N27                                 SFLEND 
A                                         SFLSIZ(0050) 
A                                         SFLPAG(0001) 
A                                         WINDOW(WINDOW1) 
A            ?PGMQ                       SFLPGMQ(10) 

Dig Deeper on iSeries COBOL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.