Previous Topic: Table Definition Screen—TDEFNext Topic: Data Selection Screen—DSEL


Column Definition Screen—CDEF

Description

The Column Definition screen allows you to add, modify, and delete columns in data tables. The column definitions are used to store data in the table and to format a screen for displaying the table online.

Note: While there is virtually no limit to the number of columns you can define for a table, the screen format generated to display the table is limited by the size of the terminal screen.

Use the Column Definition screen to define columns, as follows:

Access

You can access the Column Definition screen in the following ways:

Sample Screen

                                                      CA   CDEF   CA - Automatic System Facility            ** Column Definition **   DC560302 ADD/MODIFY COLUMNS   Table Name: APPLICANT       _ PF1 - Help                         _ PF3 - Extended Selection Definition       _ PF2 - Extended Column Definition   _ PF4 - Extended Key Definition         Page:  1  of  1                                                  Unique  Display   Ext            Column Name             Width   Type    Key     Seq    Screen   NAME                                30 TEXT       X        1      _   STREET                              30 TEXT       _        2      _   CITY                                25 TEXT       _        3      _   STATE                                2 TEXT       _        4      _   ZIP CODE                             5 TEXT       _        5      _   PHONE NUMBER                        13 TEXT       X        6      _   POSITION APPLIED FOR                30 TEXT       X        7      _   SALARY REQUIREMENT                   7 CURRENCY   _        8      _   EVALUATION: STRONG,WEAK,MEDIUM       6 TEXT       _        9      _

Fields

Table Name

Displays the name of the table, as specified on the Activity Selection screen.

[PF1] - Help

Invokes the Help screen.

[PF2] - Extended Column Definition

Invokes the Extended Column Definition screen, which allows you to specify additional characteristics for the column and displays more information about the column

[PF3] - Extended Selection Definition

Invokes the Extended Selection Definition screen, which allows you to select, at definition time, the data to be included in the table.

[PF4] - Extended Key Definition

Invokes the Extended Key Definition screen, which allows you to establish indexes for a table.

Page: ___ of ___

Displays the current screen page number and the total number of pages in the page set. You can move to a particular page by specifying its page number, page forward by using [PF8], and page backward by using [PF7].

Column Name

Enter, modify, or delete the column name, as follows:

Width

Enter the width of each column. The width is the number of characters or digits the column is to contain. If the column type is CURRENCY (see the Type field below), the minimum column width specified must be 2, for the two decimal places. You cannot change the width of derived columns in views.

Note: When defining the width of numeric columns, you are specifying the number of digits the column can contain, not the length of the response field needed to display the column on the formatted screen. The external picture of the column, which is displayed in the Display Format field of the Extended Column Definition screen, determines how long the response field for the column will be.

When considering the format of the screen that the system will generate for the table, keep in mind that the width determines how many lines on the screen a column requires to display data. Assuming an 80-character screen, the first 46 characters of data can be displayed on the same line as the column name. Columns wider than 46 characters will be displayed on more than one line on the formatted Data Display screen.

Type

Enter the column type as TEXT, NUMERIC, or CURRENCY. You can enter a 1-character response (T, N, or C) for each column, as follows:

You cannot change the column type once the column has been added.

Unique Key

Designates one or more columns as an index key for the table. The system creates an index using the unique key to store the rows of the table. By default, the unique key is used to display the rows of a table in ascending order. The display sequence can be changed by using the Extended Key Definition screen. To specify a column or columns as a unique key, enter any character in the Unique Key field for the chosen column(s). You can define a unique key for stored tables only.

Note: The data contained in the key column(s) must be unique to the table; duplicate data is not allowed. The key column(s) is used to sort the rows, in ascending order, for storage and display.

Display Seq

Specifies the order in which columns are to appear when the table is displayed online through the generated application. The following considerations apply to the use of this field:

The default display sequence is the order in which the columns are defined.

Note: Although all columns are given a display sequence number, whether specified by you or automatically assigned by the system, the number of columns actually displayed on the formatted screen depends on the number of available lines on the terminal screen. Columns that do not appear on the formatted screen do exist in the table, but they cannot be displayed.

Derived columns that result from a second-level (or greater) OCCURS clause cannot be displayed through ASF. They are automatically assigned a display sequence of 0 (zero), which cannot be changed. For example, the following column definitions were derived from a table:

REGION.1
REGIONAL-MANAGER.1
SALES-MANAGER.1.1
SALES-MANAGER.1.2
REGION.2
REGIONAL-MANAGER.2
SALES-MANAGER.2.1
SALES-MANAGER.2.2
REGION.3
REGIONAL-MANAGER.3
SALES-MANAGER.3.1
SALES-MANAGER.3.2

The SALES-MANAGER columns cannot be displayed because they are derived from a field that has a second-level OCCURS clause. Online mapping, which creates the screen format for the ASF-generated application, supports first-level OCCURS clauses only. The SALES-MANAGER columns are part of the table definition, but cannot be displayed online through the ASF-generated application.

Ext Screen

Selects a column for display through the Extended Column Definition screen. Enter any character in the Ext Screen response field for the columns you want to display and press [PF2]. The Extended Column Definition screen is displayed for the first column selected. Continue to press [PF2] to display the extended definitions for the remaining selected columns.

To display the extended definitions for all columns, leave the Ext Screen field blank for all columns and press [PF2]. The Extended Column Definition screen is displayed for the first column defined on the Column Definition screen. Continue to press [PF2] to display the extended definition for each remaining column on the page. To display extended definitions for columns on a subsequent page, you must go to that page of the Column Definition screen and press [PF2].