Example of defining a result field in Query for iSeries
An example of how you would create a numeric result field called
DAYS
using the expression
WEEKS * 7
and using the report column heading
Total Days
is shown on the following display. The second input area
shows how you would define a character result field called
GREETING
with a value of
‘Have a nice day‘
and no column heading.
Define Result Fields
Type definitions using field names or constants and operators, press Enter.
Operators: +, -, *, /, SUBSTR, ||, DATE...
Field
Expression
Column Heading
Len Dec
DAYS
WEEKS * 7
Total
_____ __
Days
GREETING
’Have a nice day’
*NONE
_____ __
Bottom
_________________________________________________________________________
Field
MONTHS
WEEKS
YEAR
Bottom
F3=Exit
F5=Report
F9=Insert
F11=Display text
F12=Cancel
F13=Layout
F20=Reorganize
F24=More keys
Note:
See “CCSID and result field expressions in Query for iSeries” on page 252 for information on how
CCSIDs affect result fields.
Adding or removing result fields in Query for iSeries
Adding a result field to your query definition requires positioning the cursor to the top half of the display
and using F9 to insert a blank set of result field definition lines. After you have entered the information
necessary to define your new result field or fields, they are inserted after the set where the cursor was
positioned when you pressed F9. Note that a result field must be defined before it can be used as part of
an expression to create another result field.
Once you have positioned the cursor in the top half of the display, the page down key will continue to
show you the next two field definitions until you reach the last nonblank definition in the list. Page up
shows you the previous two definitions until you reach the beginning of the list.
To remove a result field, blank out all references to the field and its definition on the Define Result Fields
display. You must remove all other occurrences of it from your query, but Query leads you to any
occurrence of that result field in other expressions or in other parts of the query definition.
86
Query for iSeries Use V5R2
Содержание @server iSeries
Страница 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 2: ......
Страница 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 12: ...x Query for iSeries Use V5R2 ...
Страница 14: ...2 Query for iSeries Use V5R2 ...
Страница 18: ...Figure 3 Major Tasks on the Query Menu and the Work with Queries Display 6 Query for iSeries Use V5R2 ...
Страница 32: ...20 Query for iSeries Use V5R2 ...
Страница 38: ...26 Query for iSeries Use V5R2 ...
Страница 44: ...32 Query for iSeries Use V5R2 ...
Страница 116: ...104 Query for iSeries Use V5R2 ...
Страница 122: ...110 Query for iSeries Use V5R2 ...
Страница 146: ...134 Query for iSeries Use V5R2 ...
Страница 150: ...138 Query for iSeries Use V5R2 ...
Страница 174: ...162 Query for iSeries Use V5R2 ...
Страница 178: ...166 Query for iSeries Use V5R2 ...
Страница 196: ...184 Query for iSeries Use V5R2 ...
Страница 198: ...186 Query for iSeries Use V5R2 ...
Страница 204: ...192 Query for iSeries Use V5R2 ...
Страница 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Страница 206: ...194 Query for iSeries Use V5R2 ...
Страница 210: ...198 Query for iSeries Use V5R2 ...
Страница 242: ...230 Query for iSeries Use V5R2 ...
Страница 256: ...244 Query for iSeries Use V5R2 ...
Страница 270: ...258 Query for iSeries Use V5R2 ...
Страница 272: ...260 Query for iSeries Use V5R2 ...
Страница 292: ...280 Query for iSeries Use V5R2 ...
Страница 293: ......
Страница 294: ... Printed in U S A SC41 5210 04 ...