You can define or modify a presence, class, and value validation for each Data Element called in a Segment by opening a definition wizard.
This wizard is used by transaction files. A transaction file is made of records that update a permanent file. Transaction files are validated and update permanent files or databases. The type of update (creation, modification, deletion, or others) 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. 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.
Values | Comments |
---|---|
None | |
F: Optional | Default value. |
O: Required | Required. Generation of a level 'E' (transaction refused) in standard error messages. |
P: Required (C error) | Required. Generation of a level 'C' (Data Element refused) in standard error messages. |
I: Forbidden | Not authorized. For relational databases, it indicates the presence of a column in a table. |
Values | Comments |
---|---|
None (recommended) | Only the control automatically generated by the class is requested. |
A: Alphabetic | For an alphanumeric class, numeric and special characters will be rejected. This control is the same as the automatically generated control if the Pure alphabetic box is checked. |
L: Lowercase alphabetic | For an alphanumeric class, only lowercase letters will be accepted. |
U: Uppercase alphabetic | For an alphanumeric class, only uppercase letters will be accepted. |
9: Numeric | Numeric only. For an alphanumeric class, alphabetic and special characters will be rejected. |
B: Numeric after replacing leading blanks with zeros | For a numeric class, leading blanks will be replaced by zeros. |
Z: Numeric after replacing all blanks with zeros | For a numeric class, all blanks will be replaced by zeros. |
Moreover, if this line is not correct, this column also displays an error or warning symbol, depending on the error gravity. A hover help indicates the source of the error.
Types | Values | Comments |
---|---|---|
Contents Validation | = | Equal to the value entered in the Values/Subfunction field. |
< | Less than the value entered in the Values/Subfunction field. | |
> | Greater than the value entered in the Values/Subfunction field. | |
T | Must be indicated in the Update/Target field in the table. Content validations entered after a 'T' type validation are not executed. | |
E | Must have one of the values defined on the Data Element Description (-D Lines tab). | |
Validation by PERFORM | P | Validation by PERFORM of a subfunction defined
by the user. There can be only one validation by PERFORM per Data
Element called in a Segment. The following operations are executed:
|
Values | Comments |
---|---|
Blank | Direct update of the Data Element in the Update/Target field, contingent upon the valid presence of the Data Element. This type of update can also be used with a ″Content Validation″ other than 'T'. |
+ | Update by addition, contingent upon the valid presence of the Data Element. |
- | Update by subtraction, contingent upon the valid presence of the Data Element. |
M | Update by unconditional substitution (MOVE). Updating is done regardless of the validation result. This type of update can be used with group Data Elements. |
Values | Comments |
---|---|
V | Initial value. It generates a value using the
literal entered in the Values/Subfunction field. It is the default value defined on the element description if the Values/Subfunction field is not used and if the element description has a D-type line The Record type field on the Call of Data Structures (-CD Lines) tab must authorize the generation of VALUES clauses. |
W | Same as V, but the literal can be continued into the Update/Target field. These two fields are then considered as one. |
Contexts | Values | Comments |
---|---|---|
DL/1 group key Data Element | M | To indicate a group key Data Element associated with the code entered (after A*) in the Update/Target field. |
Pactables function | S | It indicates that the Data Element belongs to
one or more subschemas. The subschemas are entered in the Values/Subfunction field. If the Data Element belongs to a group Data Element, you must enter a subschema number on the group Data Element line. |
SQL relational database function | The Values/Subfunction field is used to indicate the subschemas a column belongs to. |
The possible values to be entered in this field are presented in Table 9 and Table 10.
Values | Comments |
---|---|
Data Structure code in the Program of a permanent file. | Code in the Program of the Data Structure to be updated (Usage set to P in the Call of Data Structures), or of the Table Data Structure if the Control type field is set to T. |
Data Structure code | The Data Structure code for the target of an update. |
Working Data Structure code | Working Data Structure code for the Data Element communication area in a perform (Control type set to P). |
** | Associated with a repetitions number, in order to generate a variable number of OCCURS, using a counter contained in an element. This counter is referenced by the Segment and Data Element which are indicated in the Update/Target field (second and last parts). |
Generation of an OCCURS DEPENDING ON clause. The transfers of the counter between the input, working, and output areas are automatically carried out if this counter belongs to the common part. | |
R* | To redefine a Data Element within a Segment.
The Data Element will redefine the first Data Element that precedes
it and which is generated at the same COBOL level. Example: ELEM. GR GRPFLD 2 ELEM1 ELEM2
R* <--- or NEWVAL R* <---
If R* is entered opposite ELEM2, ELEM2 will redefine ELEM1. If R* is entered opposite NEWVAL, NEWVAL will redefine GRPFLD. |
A* | To identify the external name of a DL/1 key or search field. The external name (8 characters) is entered in the Update/Target second and last parts and applies to the Data Element specified on this line. |
SQL relational databases | |
The relational label of a column can be identified in this field. The value A must be left-aligned and followed by the external name of the column. |