DB2 graphic QMF Version 8

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 include 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"

Example of issuing a message from a QMF REXX procedure

/* QMF REXX PROCEDURE */
MSGTEXT="ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"||,
"AAAAAAAAAX""MESSAGE(TEXT=("MSGTEXT"))"/*MAXTEXT=360PARANS*/EXIT

Example of issuing a QMF MESSAGE command from a linear QMF procudure

MESSAGE(TEXT='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+DXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+EXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ')

Examples of MESSAGE Commands with ISPF Available


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004