SNGL display format

In SNGL display format, only one row of the table is displayed on the panel at the one time.

Edit panel in SNGL display format (with all optional columns displayed) shows an example of an edit display in SNGL display format.

Figure 1. Edit panel in SNGL display format (with all optional columns displayed)
  Process   Options   Utilities   Help
────────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)                     Table Edit                          1 of 42
 TABLE FMNUSER.EMP                                                  Format SNGL
 Top Column is 1    of 13    in Row 1
 Ref Rdf Key   Column    Type(len)   Data
 #1      PU    EMPNO     CH(6)       000010
 #2            FIRSTNME  VC(12)      CHRISTINE<
 #3            MIDINIT   CH(1)       I
 #4            LASTNAME  VC(15)      HAAS<
 #6            PHONENO   CH(4)       3978
 #7            HIREDATE  DATE        01/01/1965
 #8            JOB       CH(8)       PRES
 #9            EDLEVEL   SMINT           18
 #10           SEX       CH(1)       F
 #11           BIRTHDATE DATE        08/14/1933
 #12           SALARY    DEC(9,2)       52750.00
 #13           BONUS     DEC(9,2)        1000.00
 #14           COMM      DEC(9,2)        4220.00
 ****  End of record  ****

 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Previous F11=Next     F12=Cancel

The columns of the table are displayed vertically on the panel, with the column header on the left of the panel, and the data for that column on the right. Each column of the table is formatted according to the data type for that column. For example, numeric data types are displayed as whole or decimal numbers, and date and time fields are displayed as dates or times.

By default, the headings are the names of the columns as defined in the Db2® catalog. You can change them by editing the template.

For SELECT statement in a File Manager/Db2 editor session, the heading might be displayed as COLnnn where nnn is 001, 002, and so on. This indicates a generated column name. Both of the following examples cause FM/Db2 to generate a column name:
SELECT 1, dbname FROM SYSIBM.SYSTABLES
SELECT CONCAT(dbname, tsname) FROM SYSIBM.SYSTABLES
One or more columns in the FM/Db2 editor session might be protected. This can occur if:
  • The object being edited has a primary key, and the Allow updates to primary key option is not selected.
  • The object being edited is a read-only view.
  • The object being edited is the result table from an arbitrary SELECT statement (that is, select statement edit).
  • The object being edited is a table, but contains columns, excluding ROWID columns, marked as not updateable in the Db2® catalog. The Db2® catalog tables fall into this category.
If you display data in SNGL display format, you can:
  • Scroll within the row (up and down)
  • Scroll forward and backward within the table (to show the next and previous non-excluded rows)

To display the data in hexadecimal format, use the HEX primary command HEX ON.

In SNGL display format, the view or edit display always shows two columns: the name of the column, and the data for that column.

Optionally, you can display up to three additional information columns. Two of these columns, Ref and Key, are displayed to the left of the column containing the column name; the third, Type(Len) is displayed between the name and data columns. If you choose to show all information columns, the displayed columns are (in order of appearance from left to right):
Ref
An optional column showing the column number (as defined in the Db2® catalog).

You can turn this optional column on and off with the REFS primary command. The value shown can be zero if displaying the result table from an arbitrary select statement (that is, select statement edit). This indicates either that the column is generated, or that the column is not a column of the first table named in the FROM clause of the SELECT statement that produced the result table.

Rdf
Unused.
Key
An optional column showing information about primary keys, foreign keys, unique indexes and check constraints.

You can turn this optional column on and off with the INDEXINF primary command.

Column
A column showing the column name.

This column may also show the start and end position of the character data displayed for a row. For this to occur:

  1. The length of the data for the column must be long enough to require two or more rows to display.
  2. The Show char position range editor option needs to be selected, or the CHARPOS command can be issued to turn on the character position range display. For more information, see Editor Options (3 of 8) panel and CHARPOS command CHARPOS primary command.
Type(Len)
An optional column showing the data type for the column (and the length for non-numeric fields).

You can turn this optional column on and off with the TYPE primary command

Data
A column showing the (formatted) data for the column.
You can customize the view or edit display either:
  • For all FM/Db2 editor sessions by setting the appropriate global option using the Editor Options panels, or
  • For the current FM/Db2 editor session only:
    • For View, you set the appropriate option using the Db2® View panel.
    • For Edit, you set the appropriate option using the Db2® Edit panel.

Related tasks

Related references