Assigning labels to rows

In a File Manager/Db2 editor session, if you use the CHANGE, DELETE, EXCLUDE, EXPORT, or FIND command in TABL display format, you can limit the rows that are searched by entering a range parameter. The range parameter consists of a pair of labels indicating the first and last rows to be searched. The string is found if it is contained within the specified range.

A label can be one to four alphabetic characters, beginning with a period (.). Labels starting with the letter “Z” are assigned by the editor.

You assign a label by typing the valid character string into the prefix area of the row. In the following example, the label .HERE is assigned to row number 16 and the label .THRE is assigned to row number 129:
⋮
00015 This is a row.
.HERE This is a row with a label.
00017 This is a row.
⋮
00128 This is a row.
.THRE This is a row with a label.
00130 This is a row.
⋮

After it is assigned, a label stays with the row, even if the row is moved.

To remove a label from a data row, blank out the label characters (or overtype them with a new label) then press Enter. You can unassign a label by deleting the row containing that label, or you can remove all row labels by using the RESET LABEL command.

You can overtype a label with a prefix command without unassigning the label. The label reappears at the completion of the command and remains displayed in the row prefix area.

You can move a label to another row by typing the same label on a new row.

Some labels are automatically assigned and maintained by the editor. These special labels begin with the letter “Z” (Your own labels therefore must not start with a “Z”.) Unlike other labels, these editor-assigned labels do not necessarily stay with the same row, but instead represent logical positions on the display.

Some of these editor-assigned labels are available to you. The editor assigns:
.ZCSR
To the row on which the cursor is currently positioned.
.ZFST
To the first row (relative row number 1). This can be abbreviated to .ZF.
.ZLST
To the last row. This can be abbreviated to .ZL.
The following FIND command finds the next row, excluded or non-excluded, containing the string xxx, in the column with column number 5, in the range of rows from the current cursor position to the end of data:
FIND xxx #5 .ZCSR .ZLST
The following EXCLUDE command excludes all rows, excluded or non-excluded, containing the string “ABC”, in either of the columns with column numbers 3 and 7, in the range of rows from the label .HERE to the label .THRE:
EXCLUDE ALL ABC (#3 #7) .HERE .THRE

If you use the range parameter, the two labels must be separated by a blank or comma. A single label is not allowed. The labels can be any combination of the editor-assigned labels (.ZCSR, .ZFST, .ZLST) or labels you have assigned yourself.

The label representing the smaller relative row number is used as the start of the range and the label representing the larger relative row number is used as the end of the range, regardless of the order in which they are specified.

If the range you specify includes excluded rows that are hidden from display or represented by shadow lines, those rows are not affected by the command.

Related references