Rational Developer for System z, Version 7.6

Definition of controls for the -CE lines in a Segment

You can define or modify a presence, class and value validation for each Data element called in a Segment via a definition wizard.

The presence check and class control are to be defined in a wizard that opens via the More button in the following definition sections of the -CE lines tab in the Segment's editor:
  • Segment call,
  • Data element call,
  • Undefined Data definition,
  • Group definition,
  • Filler definition.
For the Fillers called in a Segment, you can define or modify operators only.

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 to 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 will represent 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

In the Presence Check section of the definition wizard, you must specify whether the presence of the Data Element is required, optional or forbidden when the transaction file updates the permanent file or database.
Creation
You specify here whether the Data Element presence is required when the transaction file creates a record in the permanent file or database.
Modification
You specify here whether the Data Element presence is required when the transaction file modifies a record in the permanent file or database.
Deletion
You specify here whether the Data Element presence is required when the transaction file deletes a record in the permanent file or database.
Type 4
You specify here whether the Data Element presence is required when the transaction file updates a record in the permanent file or database. A type-4 action is a non-standard action that you must describe entirely.
Type 5
You specify here whether the Data Element presence is required when the transaction file updates a record in the permanent file or database. A type-5 action is a non-standard action that you must describe entirely.
Type 6
You specify here whether the Data Element presence is required when the transaction file updates a record in the permanent file or database. A type-6 action is a non-standard action that you must describe entirely.
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 allowed. For Relational Databases, it indicates the presence of a Column in a Table.

Class control

Class control
You can select a class control, specific to the Data Element call. This control complements the Data Element class indicated in the Data Element Definition . For example, for a pure alphabetic alphanumeric Data Element, you may want to specify whether it accepts lowercase or uppercase characters.
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 that automatically generated 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 zeroes For a numeric class, leading blanks will be replaced by zeroes.
Z: Numeric after replacing all blanks with zeroes For a numeric class, all blanks will be replaced by zeroes.
Note: 'B' and 'Z' type validations are possible for any data element with a 'display' format (unpacked).

More...

Logical Operator
The Operator field is directly related to the Value or Working/Special name field. It enables you to specify if the values of the Data Element, when called in this Segment or Table, must be lower than or equal to.... the value indicated in the 'Value' field or contained in the 'Working/Special name' field. By default, the authorized values are the same as those indicated in the Data Element editor, -D lines. The 'Values' operator is the default.
Values Comments
' ' Must not appear on the first line for a data element.
E AND
O OR
Negation
Values Comments
N Negation ('NOT' is generated).
Blank No negation.
Control type
This field has several different uses. More than one entry may be needed to assign all the validation conditions, update conditions and values that apply to a data element. In this case, enter the desired values on as many lines as needed, immediately following the original line used to call the element.
Table 1. Definition of the type of validation
Types Values Comments
Contents Validation = Equal to the value entered in the Values/Sub-function field.
  < Less than the value entered (as above).
  > Greater than the value entered (as above).
  T Must be indicated in the Update target field in the table. Content validations entered following a 'T' type validation are not executed.
  E Must have one of the values defined on the Description screen (-D lines) for this data element.
Validation by PERFORM P Validation by PERFORM of a sub-function defined by the user. There may be only one validation by PERFORM per data element called in a segment.

The following operations are executed:

  • transfer of the data element into the COBOL work area named in the Update Target field. The naming of the work area on the appropriate line is the responsibility of the user.
  • PERFORM the sub-function entered (left-justified) in the Values/sub-function code field. This sub-function may check and modify (as needed) the data element. The result of the validation is indicated in the error indicator (DEL-ER), which is automatically generated. This result is automatically transferred to the error table (DE-ERR) in the location that corresponds to the element being processed.
  • transfer of data from the work area to the initial data element, thereby incorporating any modifications made as a result of the performed function. This option is recommended for date validation, with possible inversion. In this case, the date must be defined as an elementary data element. In the description of a data element in a transaction, a ″Validation by PERFORM″ can be executed before or after a ″Content Validation″. If it appears before, it is executed only if the data is present with no error. If it appears after, it is executed only if there is a content error. The value for the corresponding location in the DE-ERR table then becomes the responsibility of the user.
Table 2. Definition of the type of update
Values Comments
Blank Direct update of the data element in the Update target field, contingent upon valid presence of the data element. This type of update can also be used with with 'contents Validations″ other than 'T'.
+ Update by addition, contingent upon valid presence.
- Update by subtraction, contingent upon valid presence.
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.
Table 3. Definition of an initial value
Values Comments
V

Initial value: generates a value using the literal entered in the Values/sub-function code field.

It is the default value defined on the element description if the Values/sub-function code 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) tab must allow for the generation of VALUES clauses.

W Same as 'V', but the literal can be continued into the Update target field. The two fields together would be considered as one.
Table 4. Special usages
Contexts Values Comments
DL/1 GROUP KEY DATA ELEMENTS M To indicate a group key data element associated with the code entered (after 'A*') in the Update target field.
PACTABLES FUNCTIONS S

This indicates that the data element belongs to one or or more sub-schemas. The sub-schemas are entered in the VALUES / SUB-FUNCTION CODE field.

If the data element belongs to a group element, you must enter a sub-schema number on the group element line.

SQL RELATIONAL DBD FUNCTION   The VALUE / SUBFUNCTION CODE field is used to indicate the sub-schema(s) a Column belongs to.
Values/sub-function
The input made in this field depends on the value of the Type field: validation, update, values:
  • Numeric or alphanumeric literal, name of manually positioned work area or sub-function code (left- justified), called by PERFORM in a Data Element validation.
  • With =, > or <, enter the value to be compared.
  • With P, enter the sub-function code to be performed. This code must be left-justified.
  • With +, or M, enter the value to be added, subtracted, or moved.
  • With V, enter the literal to use as the initial value.
  • With W, enter the first part of the literal (which extends into the next field).
  • With S (PACTABLES and SQL DBD functions), enter the letter O in the position in this field that corresponds to the sub-schemas to which the element belongs:
    Example: CONT VALUE/SFC DELCO S O OOO.

    In this example, the Data Element 'DELCO' belongs to sub-schemas 1,3,4 and 5.

Update target
This field has several different usages:
  • To identify the target of the update;
  • To identify the counter field defining a variable number of repetitions;
  • To cause the redefinition of a data element within a segment;
  • To identify the external name of a DL/1 search or key field;
  • As a continuation of a literal.
Table 5. Update target: first part
Values Comments
Data Structure code in the Program of a permanent file. The filed Usage of Data Structure must be set to P on the Call of Data Structures to be updated, or of a table Data Structure with field Type (validation, update, values) 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' (Type (validation, update, values) 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 codes which are indicated in the Update target field / second and last parts.
  Generation of an OCCURS DEPENDING ONclause. Transfers of the counter between input, WORKING and output areas are carried out automatically by VA Pacbase if this counter belongs to the common part.
R* To redefine a Data Element within a Segment. The Data Element named in the Data Element code field will refine the first Data Element that precedes it 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 entered in the Data Element code field on this line.
  SQL Relational Databases
  The relational label of a Column can be identified in this field; the value A must be left flushed and followed by the external name of the Column.
 
Table 6. Update target: second part. The second part of the update/target field is two characters long.
Values Comments
Segment code Default value.
continuation of a literal.  
First two characters of the DL/1 external name.  
Other possibility: enter a Data Element code in the Update/Target field to specify a hidden Data Element. This is the default value, it also works for a modification.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)