Segment Definition tab

The type of values you enter in this tab depends on the use context of the Segment. The tab contains fields that are specific to the 00 or other Segments you have defined.

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 code 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
Enter 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, called the action code Data Element, represents the action code. 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 when a create action is carried out.
Table 1. Presence check: values for a creation action
Values Meaning
None No specification.
P: Required (C error) The Segment must be present on a create action. Generation of a level C error in the standard error messages.
F: Optional Default value. The Segment is optional on a create action.
O: Required The Segment must be present on a create action.
I: Invalid The Segment must not be present on a create action.
Modification
Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required when a modify action is carried out.
Table 2. Presence check: values for a modification action
Values Meaning
None No specification.
P: Required (C error) The Segment must be present on a modify action. Generation of a level C error in the standard error messages.
F: Optional Default value. The Segment is optional on a modify action.
O: Required The Segment must be present on a modify action.
I: Invalid The Segment must not be present on a modify action.
Deletion
Enter the presence specifications for the specific Segment. You specify whether the presence of the specific Segment is required when a delete action is carried out.
Table 3. Presence check: values for a deletion action
Values Meaning
None No specification.
P: Required (C error) The Segment must be present on a delete action. Generation of a level C error in the standard error messages.
F: Optional Default value. The Segment is optional on a delete action.
O: Required The Segment must be present on a delete action.
I: Invalid The Segment must not be present on 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 when a type 4, 5 or 6 action is carried out.
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 on a type 4, 5 or 6 action.
O: Required The Segment must be present on a type 4, 5 or 6 action.
I: Invalid The Segment must not be present on a type 4, 5 or 6 action.

00 Segments

Structure code
Enter the code of the Data Element used to identify the type of record (6 characters maximum).
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, called the action code Data Element, represents the action code. 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: Example: ADD.
Modification
Enter the value that stands for modify for this file. Example: CHG.
Deletion
Enter the value that stands for delete for this file. Example: DEL.
Type 4
Enter the value that stands for implicit action codes - (creation or modification).
Type 5
Enter the value that stands for this user-defined action.
Type 6
Enter the value that stands for this user-defined action.

Feedback