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:
·
·
·
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.
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