The Column Definition Screen
The Column Definition (CDEF) screen is now displayed. Notice that the table name JOB is in the Table Name field.
The cursor is positioned below the Column Name field heading. The first column name to be defined for the JOB table is JOB NUMBER. Type job number in the Column Name response field.
Move the cursor to the Width field. The column width is the number of characters the column will accept. Assign the JOB NUMBER column a width of four by typing 4 in the Width field.
Column Data Type
You can optionally specify the type of entry the column can accept. The entry types can be TEXT, NUMERIC, or CURRENCY. Since TEXT is the default, and the JOB NUMBER column can accept alphanumeric values, you do not need to complete the Type field. Press [Return].
CA CDEF CA - Automatic System Facility ** Column Definition ** DC560306 NO COLUMNS DEFINED FOR TABLE Table Name: JOB _ 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 job number1 42 _3
Enter the remaining columns, shown below, for the JOB table:
|
Column name |
Width |
Type |
|---|---|---|
|
DEPARTMENT |
20 |
|
|
TITLE |
30 |
|
|
SALARY |
7 |
C |
|
CURRENT STATUS (FILLED OR OPEN) |
6 |
|
Define the Columns
To define the columns:
The CURRENCY column type causes ASF to provide two decimal positions for a numeric column, enabling you to enter dollar and cent amounts as column values.
CA CDEF CA - Automatic System Facility ** Column Definition ** DC560306 NO COLUMNS DEFINED FOR TABLE Table Name: JOB _ 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 job number 4 department 20 title 30 salary 7 c current status (filled or open) 6
ASF Updates the Screen
When you have entered all the columns, press [Enter]. ASF rewrites the screen and fills in appropriate default values, as follows:
Your screen should look like the Column Definition screen below.
CA CDEF CA - Automatic System Facility ** Column Definition ** DC560307 COLUMNS UPDATED Table Name: JOB _ 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 JOB NUMBER 4 TEXT _ 1 _ DEPARTMENT 20 TEXT _ 2 _ TITLE 30 TEXT _ 3 _ SALARY 7 CURRENCY _ 4 _ CURRENT STATUS (FILLED OR OPEN) 6 TEXT _ 5 _
Modify Column Definitions
Once ASF accepts the column definitions, you can add columns and/or modify columns. For this example, make the following changes to the column definitions you have entered:
Note: These characteristics could have been entered when you defined the columns initially, but are being entered as modifications for the purpose of this example.
CA CDEF CA - Automatic System Facility ** Column Definition ** DC560307 COLUMNS UPDATED Table Name: JOB _ 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 JOB NUMBER 4 TEXT _ 1 _ DEPARTMENT 20 TEXT _ 2 _ TITLE 30 TEXT _ 3 _ SALARY 7 CURRENCY _ 4 _ CURRENT STATUS (FILLED OR OPEN) 6 TEXT _ 5 _
Press [Enter] to record the changes with ASF. When ASF accepts the changes, press [Clear] to return to the Table Definition screen.
The Table Definition Number
Notice on the Table Definition screen (now displayed) that a definition number has been assigned to the table and is displayed in the Defn Number field. The table definition number is a unique number assigned to the table by ASF. The Status field displays the message UNGENERATED. This indicates that you have successfully defined the stored table and must now generate it.
|
Copyright © 2014 CA.
All rights reserved.
|
|