Locating a column

You can use the LOCATE primary command to move to a particular column. You can specify either a Db2® column number, or part or all of a column name.

You specify a Db2® column number by preceding the column number with the # symbol (for example, #4). Db2® column numbers are shown on the Column Selection/Edit panel, and optionally in both TABL and SNGL display formats when you view data. (To display column numbers, you must select the Show column number option on the third Editor Options panel.) For long character columns only (> 50 bytes) you can optionally locate a character position within a column.

You specify a Db2® column name by typing all or part of the column name, with or without quotation marks.

When FM/Db2 finds the specified column, it scrolls the data so that the matching column is displayed on the left of the screen (in TABL display format), or at the top of the screen (in SNGL display format). In addition, after FM/Db2 has found the specified column, in SNGL display format if you press F11 (to display the following record) or F10 (to display the preceding record), the data is scrolled to show the matching column at the top of the screen for each record displayed. If you change to TABL display format, the data is scrolled so that the matching column is displayed on the left of the screen.

Related tasks

Related references