Column Mode Edit
Column Mode is selected by entering
Cfor the Edit Mode field in the RC/Edit header or Edit Options screen. The Column Mode screen appears.
Column mode is used to edit multiple rows on the screen at one time. A row always takes one line and columns are scrolled horizontally with the F10 (Left) and F11 (Right). Rows are scrolled with the F7 (Up) and F8 (Down) keys.
You can control the display length of character data by taking either of the following actions:
- Adjust the value in the Max Char field in the header area. For example, enter a small value to view more columns on one screen.
- Issue the SETWIDTH command to request the preferred length.
Column Mode Header
The screen header provides information and acts as a control center for the edit session. The control information can be changed at any time. For more information on fields, press F1 (Help).
More columns can be viewed on the screen by shrinking the character width down to a smaller number. Use the EXPLODE option (see EXPLODE Facility) to view the whole column in ISPF Edit.
Processing for Column Mode Edit
The Column Mode Edit screen is designed to maximize row operations. Edit operations can be performed on as many rows as needed. Full ISPF scrolling is available and extensive type checking is performed to help ensure valid data.
Enter a line editing command in the OPT (option) column. The available ISPF-like line editing commands follow:
- B– Specifies a point before which to move or copy lines.
- C, C– Copies a line, a number of lines, or block of lines, respectively.nn, or CC
- D, D– Deletes a line, a number of lines, or block of lines, respectively.nn, DD
- F or Fnn–Shows the first line of a block of excluded lines, or firstnnnumber of lines from an excluded block.
- I, Inn–Inserts a line or a number of lines.
- K– Inserts an information line in the table display, indicating the primary (Pn) and foreign key (FK) columns of the table.
- L or Lnn–Shows the last line of a block of excluded lines, or lastnnnumber of lines from an excluded block.
- M, M– Moves a line, a number of lines, or block of lines, respectively.nn, or MM
- R, R– Repeats a line, a number of lines, or a block of lines, respectively.nn, RR
- S, Snn, or SS– Shows an excluded line, the firstnnnumber of excluded lines, or block of excluded lines, respectively.
- U, Unn, or UU– Undeletes a line, a number of lines, or a block of lines, respectively.
- X, Xnn, or XX– Excludes a line, a number of lines, or a block of lines, respectively.
As in ISPF, single line commands operate on individual rows. For example, entering D deletes that row.
The commands Copy, Delete, Undelete, Exclude, Repeat, and Move support block mode. Enter CC, DD, UU, XX, RR, or MM at the start and stop rows of the block perform the action on all rows within that block, inclusive of the rows containing the block commands.
Each command can be followed by a number to indicate multiple occurrences. For example, I20 inserts 20 new rows. X13 excludes 13 rows. For the MOVE command, a destination must be specified.
If line commands have been entered in error, enter the RESET command to remove the invalid entries.
Although RC/Edit allows users to move rows, DB2 does not move the rows, because by definition a relational database is non-positional. The MOVE command allows row movement for readability while in RC/Edit only.
EXCLUDE Command Notes
If a FIND command is issued that searches for text in an excluded line, the text will be found and the line unexcluded. If a CHANGE command is issued that affects text in an excluded line, the text will be changed, and the lines unexcluded.
There are also line commands that affect excluded lines.
- Fn–Shows the firstnexcluded lines, where n is a number. For example, F6 shows the first six excluded lines.
- Ln–Shows the lastnexcluded lines, where n is a number. For example, L14 shows the last 14 excluded lines.
- SS– Shows excluded blocks of text. EnterSSon the first and last lines of the block of text to show. This command is useful for showing more than one excluded block of text.
The following describes the columns that follow the OPT field.
- (S)Indicates the current status of the row. A blank status denotes a row in its initial fetched format.
- D– Indicates that the row has been deleted. The SDELETE option must be turned on to view deleted rows.
- I– Indicates that the row has been inserted. If the R line command is used, the inserted rows will have a status of I. If a user deletes a row that was inserted, then undeletes the row, the status returns to inserted.
- U– Indicates that the row has been updated.
- X– Indicates that the row has been excluded. If a block of rows was excluded, one status line for the block appears. A message displaying the number of excluded lines is also displayed.
- NullsIf a field accepts null values, then an extra prompt (N) will appear next to the name. This prompt is the Null Indicator.It denotes if the field currently is set to Null (Y). Set a field to Null by entering Y in the Null Indicator.If a field is set to null, the previous value remains in the event the user wants to change it. However, the value for that field will be NULL if the indicator is Y. For a description of Null value implications, see Null Values.
- Field NamesThe DB2 column name.
- Abbreviated Field NamesIf the TYPE command is on, an abbreviated name appears under the DB2 name. (If a second line does not appear under the field Names, the TYPE toggle does not need to be active.)The abbreviated names begin with A1. The abbreviated names make it much easier to enter column names for other primary commands such as XCOL and CHANGE.
- DB2 Data TypeThe DB2 data type, displayed along with the abbreviated name. This line is toggled on and off with the TYPE command.
There are many primary edit commands that can be entered on the command line or assigned to function keys for controlling the column display. Some of these commands include CHANGE, RCHANGE, CHANGE ALL, SORT, and TYPE.