To display, create or modify the general characteristics of a repository data type, you need to either:
Click the corresponding button of the Repository - Data types dialog box.
Select the corresponding option in the context-sensitive menu (or the equivalent button) in the Data types tab of the LDM/PDM screen.
Data entry
Name
Name of the data type.
This name must be a valid data type name (as defined by IBM), unique among the names of data types in the environment.
Length: 15 characters maximum.
Mandatory entry.
Description
Description clearly identifying the data type.
Length: 250 characters maximum.
Mandatory entry.
Type
Values available:
Alphanumeric |
|
Binary |
|
Date |
|
Extended |
|
Image |
High-capacity binary field (Binary Large Object) |
This type is not compatible with a Btrieve database or with AS/400 (native AS/400) file generation. |
|
Packed |
|
Packed by def. |
Packed by default; can be converted into "Extended" in the LDM. |
Time |
|
Timestamp |
This type is not compatible with a Btrieve database. |
Note: The Date, Time and Timestamp types are not supported by the C generator for ADELIA programs.
Length
Number with 7 positions maximum.
The length can be indicated for alphanumeric data:
- in kilobytes, by adding the suffix "K" to the value (e.g. 100K for 102400), or
- in megabytes, by adding the suffix "M" to the value (e.g. 1M for 1048576).
Optional entry.
For the Date, Time and Timestamp types, the length is protected and automatically assigned as follows:
- Time: 8 characters.
- Timestamp: 26 characters.
- Date:
- *MDY, *DMY and *YMD formats: 8 characters; |
- *JUL format: 6 characters; |
- *ISO, *USA, *EUR and *JIS formats: 10 characters. |
See the Type and Date format fields. |
When the type is Alphanumeric:
- you can check the relevant Variable chekbox to specify the type is variable. An input field then appears, letting you enter a minimum reserved length.
Note: By default, for PC SQL DBMSs, alphanumeric types (whether variable or not) are generated in VARCHAR (NVARCHAR) format, except if the "Non variable alphanumerical in CHAR" box is checked. When this is the case, only the variable alpha types are generated in VARCHAR (NVARCHAR) format, the non variable types being generated in CHAR (NCHAR) format.
- you can specify that the field must be stored in the database in Unicode (or a national character set, depending on the DBMS) by checking the Unicode box associated with the field.
For the Image type, the length is only taken into account with DB2/400. This length must be a value between 1 and 2048 Mb, or it can be set to the Default value, in which case the table column size will be DB2/400's default size, i.e. 1 Mb.
Min. reserved lg.
Minimum reserved length.
This value is only taken into account by DB2/400.
This field is only visible if the type indicated in the Type field is Alphanumeric and the Variable checkbox is checked.
Date format
Format used for the date.
Possible values:
*ISO |
ISO format. |
*MDY |
Month, day, year. |
*DMY |
Day, month, year. |
*YMD |
Year, month, day. |
*JUL |
JULIAN format. |
*USA |
American format. |
*EUR |
European format. |
*JIS |
JIS format. |
This field is only visible when Date is specified in the Type field.
Nbr of decimals
Number of two-digit decimal positions.
As a rule, if this field is left blank, the data type is considered as alphanumeric; otherwise, it is considered as numeric.
This field is only visible if the type specified in the Type field is Binary, Packed, Packed by def. or Extended.
Optional entry.
SQL constraint
SQL constraint associated with the columns of the generated SQL tables.
Values available:
*ENV |
The value is the same as the one defined in the environment attributes. |
NULL |
The column can take the NULL value. This value will be used if you insert a line into the table without specifying a value for the column. |
NOT NULL |
The column cannot take the NULL value. You cannot insert a line into the table without specifying a value for the column. |
NOT NULL WITH DEFAULT |
The column cannot take the NULL value. The type's default value will be used if you insert a line into the table without specifying a value for the column. |
NULL WITH DEFAULT |
The column can take the NULL value. However, the type's default value will be used if you insert a line into the table without specifying a value for the column. |
Default: *ENV.
Radio buttons
Visibility
The visibility of a data type can be either public or private.
Only the owner of the data type, or a software engineer with modification authorities, can change the visibility.
A public data type cannot be changed into a private data type unless all the properties using it are private and are attached to the current application area.
In creation mode, the visibility is by default set to public.
Buttons
Display/Assign
This button opens a dialog box displaying the list of management rules assigned to the data type, as well as the list of available management rules which can be assigned to the data type.
Sequence
This button opens a dialog box displaying the list of management rules assigned to the data type, in order to resequence this list by modifying the sequence numbers of the listed management rules.
This button is not active in display mode.
Values
This button opens a dialog box which is used to display or modify the list of values or the limit values (Range), the default value, and the example value of a data type.
More
This button opens a dialog box which is used to display or modify the keyboard options, the edit word or code, and the help document of a data type.
Information
This button opens a dialog box displaying information on the current data type, such as the name of the software engineer-owner, the dates and times of creation and modification.
Comments
This button opens a dialog box for entering a comment text which will be associated with the current data type.
Enter/Create/Modify (validation)
The Enter button (in display mode) closes the dialog box.
The Create button (in creation mode) or Modify button (in modification mode) validates the modifications made in the dialog box (the modifications are applied to the properties which have the data type), as well as the modifications made in the dialog boxes used to:
after a verification of their validity.
The various fields of the dialog box are verified. If all are valid, the data type definition is updated in the database before the box is closed; otherwise, an error message is displayed.
Cancel
This button closes the dialog box without validating the choices made.
If a data type creation is canceled, the possible comment text is deleted, as well as the links with the management rules which were assigned to this data type.
In modification mode, this button closes the dialog box without validating the modifications made nor the ones made in the dialog boxes used to:
Keyboard-shortcut: Esc.