The next step is to display the query template and place the cursor in the first position of line three to mark where the format for the SET statement on the query template is to be inserted. Pressing <PF9> displays the QUERY TEMPLATE panel, shown next.
Panel
=> Enter the number of times each command is to be included in the query --------------------------------------------------------------------------DQD30 DATAQUERY: QUERY TEMPLATE ------------------------------------------------------------------------------- Lowercase words represent entries which must be replaced by the user. Parentheses indicate optional entries: these may be included by removing the parentheses only or deleted by removing both the parentheses and data. ------------------------------------------------------------------------------- _ FIND (count) table-name ROWS _ WITH selection-criteria _ RELATED BY key-name TO (FIRST) table-name _ RELATED BY link-column VIA key-name column-name TO table-name _ SET result (13.2) = numeric-column-name arithmetic-expression numeric-literal _ SORT table-name BY column-name (DOWN) ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> NOT USED <PF5> NOT USED <PF6> NOT USED <PF7> BACKWARD <PF8> FORWARD
Action
To copy a SET statement, follow these steps:
Entering 1 in the space before the SET format means that only one SET statement is needed. For two or more SET statements in the query, a higher number could be entered. Notice that the SET format displays the override to the default precision for temporary results, that is, (13.2).
Pressing <PF2> returns to the previous panel, which was the EDITOR's CREATE MODE panel. When the CREATE MODE panel is redisplayed, the SET format appears at the previous cursor location.
=> --------------------------------------------------------------------------DQD10 DATAQUERY: EDITOR CURRENT TABLE: CAI-DETAIL-TBL ------------------------------------------------------------------------------- NAME: USER-SAMPLE TYPE: QUERY STATUS: PRIVATE DESCRIPTION: TOTAL ORDERS PER CUSTOMER -- AVERAGE PRICE ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 FIND ALL CAI-DETAIL-TBL ROWS 02 WITH SHIP-QTY GT 0 03 SET result (13.2) 04 = numeric-column-name arithmetic-expression numeric-literal .. =========================== B O T T O M ================================== ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> DISPLAY COLUMNS <PF4> DISPLAY KEYS <PF5> DISPLAY ALL <PF6> LIST TABLES <PF7> BACKWARD <PF8> FORWARD <PF9> TEMPLATE <PF10> VALIDATE <PF11> RIGHT/LEFT <PF12> PROCESS MODE
|
Copyright © 2014 CA.
All rights reserved.
|
|