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
Summary of Contents for ISERIES SC41-5210-04
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...