Segment Definition tab
The type of values that you enter in this tab depends on the use context of the Segment. The tab contains fields that are specific to the Segment 00 or to the other Segments.
Depending on the Segment type, the information that is required in the definition is different. For a non-00 Segment, you indicate the Action code value and presence check options. For a 00 Segment, you enter a value in the Action code field that is different, and you indicate the Data Element that identifies the transaction type.
- Table size
- This field is common to the 00 and non-00 Segments. It is the
amount of space that is reserved for a Segment in memory. Its length
is four numeric characters maximum:
- The Data Structure of the Segment is used in a Program as a table. By default, the default value at generation time is 100,
- The type of record description incorporates the number of OCCURS indicated here.
Note: In both cases, see the online help of the Program editor.
- Number of occurrences
- This field is used to specify the estimated number of occurrences for a Segment in a database or in a standard file.
Specific Segments
- Structure code value
- For the Segments other than the Segment 00, specify the value of the structure code as a COBOL literal. This information is required when a variable file is used in a Segment.
- Action code value
- This field and the following fields are used by a transaction file. This file is made of records
that update a permanent file. The type of update (creation, modification, deletion, or other cases)
is called the action code. Validations and updates are automatically associated with each type of
update. In the common part of the file, a Data Element, which is called the action code Data
Element, represents the action code.
A free reference is set when you indicate a Data Element in this field.
Content assist is available on this field, as shown by the symbol
in front of the field. To activate it, press Ctrl+Space. A subreference link is automatically created, even if the instance does not exist. From the target instance in the subreference results, you can start a super reference search.
You must associate six values with this Data Element, one for each type of update in the Presence check fields. Each value represents the input that the user will have to indicate in the application to carry out the appropriate update. If you do not specify any action code Data Element, all updates are considered as modifications.
- Presence check
- Enter the presence specifications for the specific Segment.
- Creation
- Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required upon a creation.
Table 1. Presence check: values for a creation action Values Meaning None No specification. P: Required (C error) The Segment must be present upon a create action. Generation of a level C error in the standard error messages. F: Optional Default value. The Segment is optional upon a create action. O: Required The Segment must be present upon a create action. I: Invalid The Segment must not be present upon a create action.
- Modification
- Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required for a modification.
Table 2. Presence check: values for a modification action Values Meaning None No specification. P: Required (C error) The Segment must be present upon a modify action. Generation of a level C error in the standard error messages. F: Optional Default value. The Segment is optional upon a modify action. O: Required The Segment must be present upon a modify action. I: Invalid The Segment must not be present upon a modify action.
- Deletion
- Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required for a deletion.
Table 3. Presence check: values for a deletion action Values Meaning None No specification. P: Required (C error) The Segment must be present upon a delete action. Generation of a level C error in the standard error messages. F: Optional Default value. The Segment is optional upon a delete action. O: Required The Segment must be present upon a delete action. I: Invalid The Segment must not be present upon a delete action.
- Type 4
- Type 5
- Type 6
- Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required for a type 4, 5 or 6 action.
Table 4. Presence check: type 4, type 5, type 6 Values Meaning None No specification. P: Required (C error) The Segment must be present. Generation of a level C error in the standard error messages. F: Optional Default value. The Segment is optional upon a type 4, 5 or 6 action. O: Required The Segment must be present upon a type 4, 5 or 6 action. I: Invalid The Segment must not be present upon a type 4, 5 or 6 action.
Segments 00
- Structure code
- Specify the Data Element that identifies the type of record (6 characters maximum) in the common
part Segment.
A free reference is set when you indicate a Data Element in this field.
Content assist is available on this field, as shown by the symbol
in front of the field. To activate it, press Ctrl+Space. A subreference link is automatically created, even if the instance does not exist. From the target instance in the subreference results, you can start a super reference search.
- Action code
- This field and the following fields are used by a transaction file. This file is made of records
that update a permanent file. The type of update (creation, modification, deletion, or other cases)
is called the action code. Validations and updates are automatically associated with each type of
update. In the common part of the file, a Data Element, which is called the action code Data
Element, represents the action code.
A free reference is set when you indicate a Data Element in this field.
Content assist is available on this field, as shown by the symbol
in front of the field. To activate it, press Ctrl+Space. A subreference link is automatically created, even if the instance does not exist. From the target instance in the subreference results, you can start a super reference search.
You must associate six values with this Data Element, one for each type of update in the following action code fields. Each value represents the input that the user will have to indicate in the application to carry out the appropriate update. If you do not specify any action code Data Element, all updates are considered as modifications.
- Creation
- Enter the value that stands for create for this file (ADD for example).
- Modification
- Enter the value that stands for modify for this file (CHG for example).
- Deletion
- Enter the value that stands for delete for this file (DEL for example).
- Type 4
- Enter the value that stands for this user-defined action.
- Type 5
- Enter the value that stands for this user-defined action.
- Type 6
- Enter the value that stands for this user-defined action.