Specify Edit

Word

 

Field

:

Heading

1 . . . .

:

Length . . . . :

Heading

2 . . . .

:

Decimal . . . .

:

Heading

3 . . . .

:

Type information, press Enter. (Put quotes around edit words.) (Each blank replaced by a digit, each ’&’ with a blank.)

Edit word

’ , , 0. -’

(These are SAMPLES only; they are not defaults.)

Edit word for

summary total . . ’ , , , 0. -’

F3=Exit

F5=Report

F10=Process/previous

F12=Cancel

F13=Layout

F16=Remove edit

F18=Files

 

For example, if you want to define an edit word containing an eleven-digit field with no decimal positions, and you want commas for thousands separators and CR for negative values, your edit word would be ’ ,

,, &CR’ and a value in the report would appear as 27,345,838,789 CR if it were a negative value.

You might define ’0( )&

-

as the edit word for a ten-digit telephone number that has been

formatted for ten or eleven digits on the Specify Report Column Formatting display.

The ten digit number 5079876543 would be displayed as (507) 987-6543.

The edit word might be

- -

for a nine-digit social security number, such as ’123-45-6789’.

Consider the following as you define your edit words. Each edit word is marked with the CCSID of the job used to define it so that it can be converted for use in a job with a different CCSID. Refer to “CCSID and column formatting and editing in Query for iSeries” on page 253 for information about how CCSIDs affect edit words.

vIf option 1 (Total) was or will be specified on the Select Report Summary Functions display to get summary totals for the field, the J edit code is used to edit the field if you do not define an edit word in the Edit word for summary total prompt.

vThe edit word for summary function totals, if used, must have three more blank positions than the field length indicates, but its length cannot exceed 31 digit positions. The editing positions containing commas for thousands separators or a period for the decimal point, for example, are in addition to the 31 maximum.

vWhen an edit word is used, its length is considered by Query in determining the column width used in the report for that field. If the summary total edit word is defined, but no summary total is defined for this field, for example, then the length of the summary total edit word is ignored in determining the column width for detailed output.

vIf both edit words are defined and used, both are assumed to be aligned on the right with the last character in each string. If they are not aligned, the ampersand (&) can be used to add blanks to one of the edit word character strings so that they are aligned.

vIf the widest edit word to be used is narrower than the column headings, the column headings are centered over it. Otherwise, the farthest right position of the column headings is aligned with the farthest right position of the edit word.

vIf you want a single apostrophe to appear in the edited result, use two single apostrophes () in the edit word.

132Query for iSeries Use V5R2

Page 144
Image 144
IBM SC41-5210-04 manual F13=Layout F16=Remove edit F18=Files