Primary commands
Db2 Query Monitor supports a number of primary commands that enable you to find information, navigate panels, modify the display of data, and print information.
- FIND abc
- Finds a unique string within a panel of data where abc is the string for
which you are searching. If the specified string is found, the cursor moves to the first
position of the found string. If the specified string is not found a message displays to
indicate that is the case. You should be as specific as possible when using the
FIND command to ensure the correct return.
The FIND command can be issued with the following keywords:
- NEXT
- Finds the next instance of the search string.
- PREV
- Finds the previous instance of the search string.
- FIRST
- Finds the first instance of the search string.
- LAST
- Finds the last instance of the search string.
- ALL
- Finds all instances of the search string.
The syntax is:
ORFIND <string> <keyword>
FIND <keyword> <string>
where <string> is the text you want to find and <keyword> is a valid keyword for the FIND command (NEXT, PREV, FIRST, LAST, or ALL).
If none of these keywords is explicitly specified, the default behavior is for the next instance of the search term to be found. If a keyword is the only parameter, it is treated as a search string. Two keyword parameters can coexist as long as one of them is identified by surrounding quotes as the search string. Otherwise, the occurrence of multiple instances of keywords causes an error.
Examples:
To find the first instance of the word "apple", issue the command:
FIND apple FIRST
To find the next instance of the word "apple":
FIND apple
To find the last instance of the word "apple":
FIND apple LAST
To find all instances of the word "apple":
FIND apple ALL
To find all instances of the word "all", use single quotes to distinguish the search term from the keyword:
FIND 'all' ALL
Or:
FIND ALL 'all'
- FORM
- Reformats the display of a selected line item on a report panel
such that each column becomes a row and values display in list format.
To use the FORM command, type FORM in
the option line, place your cursor on the line item of interest, and
press Enter. The data for the selected line item will be displayed
in list format showing column names and their associated values. Notes:
- To return to the original view from FORM view, press PF3.
- CSETUP functions are not accessible when in FORM view. Exit FORM view to access CSETUP functionality.
- NROW n
- Displays the report for a subsequent row of interest where n is
the number of rows (after to the currently displayed row) that you
want to scroll forward (when viewing reports in FORM view).
The default value of n is 1. Note: The NROW command is only valid when viewing a report in FORM view.
- PROW n
- Displays the report for a previous row of interest where n is
the number of rows (prior to the currently displayed row) that you
want to scroll back (when viewing reports in FORM view). The default
value of n is 1. Note: The PROW command is only valid when viewing a report in FORM view.
- PRINTX
- The PRINTX command takes a screen
shot of a report and sends it to an output queue. The default output
destination is the default output queue for your site. For example,
if your site's default output class is configured to send output to
the hold queue, the PRINTX command sends the currently
displayed report to the hold queue. You can then view the output using
SDSF. You can change the output class designation for the PRINTX command by entering PRINTX S in the command line and pressing Enter. The following panel is displayed:
Figure 1. PRINTX Setup panel
Enter the desired output class in the New Output Class field and press Enter. The new output class is saved across sessions and remains in effect unless you change it. For appropriate output classes available at your site, check with your systems programmer. To change the class back to the default output message class, blank out the value in the New Output Class field.SETUP ------------------------ PRINTX Setup -------------- 2010/02/25 14:27:15 Command ==> ___________________________________________________________________ Specify new output class and press ENTER or press END to cancel. If new output class is blank, default output class is used. Current Output Class ==> DEFAULT OUTPUT MESSAGE CLASS New Output Class ==> _
For a snapshot of the current display (print screen), the ISPF Print command can be used. The ISPF Print command writes output to the ISPF LIST data set. See the ISPF User's Guide (SC34-4822, SC34-4823) for more information about ISPF Print.
- SORT column_number direction
-
Sorts data (on panels of scrollable or tabular data) by column where column_number is the number of the column by which you want to sort, and direction can be either A (to sort data in ascending order) or D (to sort data in descending order).
You can refer to columns only by the column number (not the column name). Column numbers are not displayed on the panel. The CMD column is column 1 and columns to the right are incremented sequentially.
Data can be sorted in ascending (A) or descending (D) order. To specify sort order, append the A or D to the end of the SORT command. The default is ascending (A). For example, to sort column 2 in descending order, type:
SORT 2 D
in the command line and press Enter. Data will be sorted by column 2 in descending order.