Examples of using the MESSAGE command to generate messages

Suppose that you want to write an application, using a procedure, that runs two queries and displays two reports. When QMF displays the first report, you want to display a message that tells users to end the interactive session when they are ready to continue to the second report. You can write a linear procedure like that in Figure 14, which includes a message defined by the MESSAGE command on the REPORT panel. To have your message appear on the REPORT panel, place the MESSAGE command immediately before the INTERACT command:

Figure 14. Example of using the MESSAGE command
 
·
·
·
RUN QUERY WEEKLY_SALES_Q (FORM=WEEKLY_SALES_F MESSAGE (TEXT='OK, press END when you are finished viewing this report.' INTERACT RUN QUERY YEAR_TOTAL_Q (FORM=YEAR_TOTAL_F
·
·
·

If you use a procedure with logic, you can use a REXX variable in place of the text string, as in Figure 15. When you use REXX variables, you must use double quotes around the variable name in the messagetext text string.

Figure 15. Using REXX variables with the MESSAGE command in a procedure
 oktext = 'OK, press END when you are finished viewing this report.'
 "RUN QUERY WEEKLY_SALES_Q (FORM=WEEKLY_SALES_F"
 "MESSAGE (TEXT='"oktext"'"
 "INTERACT"
 "RUN QUERY YEAR_TOTAL_Q (FORM=YEAR_TOTAL_F"

Examples of MESSAGE Commands with ISPF Available

[ Previous Page | Next Page | Contents | Index ]