Prompted query panels
Figure 22 shows the Prompted Query panel
while a query is being built. Each area marked by a number in the
figure is described in the list that follows.
Figure 22. Building a prompted query
PROMPTED QUERY
1
3 MODIFIED LINE 1
+-------------------------+
Tables: |
4 Specify |
Q.STAFF | |
5 | Select an item. |
Columns:
2 | |
NAME
6 | 3 1. Tables... |
DEPT | 2. Columns... |
SALARY+COMM
7 | 3. Row Conditions... |
| 4. Sort... |
*** END *** | 5. Duplicate Rows... |
+-------------------------+
8 | F1=Help F12=Cancel |
+-------------------------+
OK, ENTER performed. Please proceed.
9
- 1
- The name of the main panel. When you are using Prompted Query,
this always says PROMPTED QUERY.
- 2
- The echo area. All of the information that you specify in
dialog panels is shown in there.
- 3
- This area shows whether the screen you are looking at was
changed in some way. If you have not made any changes, the word MODIFIED does not appear. The panel shows a line number that indicates
the first line of the query that appears on the panel. When you
scroll forward, the line number changes.
- 4
- The Specify panel is a dialog panel. Use dialog panels to
specify different kinds of information.
- 5
- This field shows instructions that tell you what kind of information
you can specify on this dialog panel, and how you can specify it.
- 6
- This is the area where you specify your choice. Different
types of dialog panels have different ways to specify items. This
dialog panel shows that your next item is 3. Row Conditions.
- 7
- This field shows the list of items you can choose from. You
sometimes have to scroll forward to see all of the items on a list.
- 8
- This field shows the active function keys. Use the function
keys to issue certain commands, such as scrolling or getting help.
- 9
- This is the message line. Whenever you issue a command in
QMF, the message line indicates whether your command was successful.
Figure 23 shows the main Prompted Query panel after
the query is built.
Figure 23. The built query
PROMPTED QUERY
1 QMFUSER.MYQUERY
2
3 MODIFIED LINE 1
Tables:
Q.STAFF
Columns:
NAME
DEPT
SALARY+COMM
4
Row Conditions:
If JOB Is Equal To 'CLERK'
Sort:
Ascending by DEPT
*** END ***
5
1=Help 2=Run 3=End 4=Show SQL 5= 6=Specify
6
7=Backward 8=Forward 9=Form 10=Insert 11=Delete 12=Report
OK, CANCEL command executed successfully.
COMMAND ===>
7 SCROLL ===> PAGE
8
- 1
- The name of the panel
- 2
- The name of a saved query
If you saved a prompted query in the database, it has a two-part
name: the user identification of the person who saved the query,
and the name you gave the query when you saved it, separated by
a period.
- 3
- This shows that the panel was changed
- 4
- This is the echo area- it currently shows the completed query
that was built using the dialog panels
- 5
- The word END means that there is no more information to look
at- if END does not appear, you can scroll forward to look at the
rest of your query
- 6
- This field shows the active function keys
QMF assigns commonly-used commands to function keys. Instead
of typing a command, you can just press the numbered function key
with that label. Your function keys might have different commands
assigned to them than the ones that are shown in the figure. The
functions of the keys depend on the assignments your QMF administrator
makes.
- 7
- This is the command line- whenever you see COMMAND ===>, you can enter a QMF command
- 8
- This is the scroll indicator- it shows how many lines QMF
scrolls when you enter a forward or backward command
Rules for using Prompted Query: Here
are some general rules for using Prompted Query:
- Your QMF profile must have the language operand set to PROMPTED; otherwise, each time you start a query, you must enter RESET QUERY (LANGUAGE=PROMPTED.
- You must type all entered data in uppercase, unless you set
the CASE operand in your QMF profile to UPPER.
- When entering data, if a character string contains a special
character, you must enclose the character string in quotation marks.
For a list of special characters, see DB2 QMF Reference.
- You must put quotes around all graphic data that you enter.
- The name you give your query cannot be longer than 18 characters.
