Segment calls in a Business Component
In the -CS Lines tab of the Server and Server Dialog editors, you must specify, for each Business Component, the Logical View that is used. For this Logical View, you must indicate the accessed Segments of a file, a table, or an SQL view. For each Segment, you must indicate the processing category (before repetitive, repetitive, and after repetitive), the type of Segment logical access processing (validation, update, and selection) and the key filling mode, the use in the generated processing, the access condition, and the physical organization.
The number of Segment description lines that are called in this tab is limited to 100 per category.
The fields are explained according to the order of their display in the CS Line - Segment call definition section.
- Segment
- Specify the name of the Segment in the repository. To do so, click
Change. A selection wizard opens with the Segments that can be selected.
Select or create a Segment and click OK. In the table, it is displayed in the
Seg / LV column.
You can also specify the Segment directly from the Seg / LV column.
Two methods are possible:- Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
- Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.
- Database Block
- This field is available only if you select H: Relational database accessed with
SQL in the Organization field. Then, you can indicate the
Database Block that contains the called resource. To do so, click Change and
select or create an instance in the wizard that opens. In the table, the selected instance is
displayed in the D. Block column.
You can also specify the Database Block directly from the D. Block column.
Two methods are possible:- Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
- Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.
- Table or view
- This field is associated with the Database Block field. You use it to indicate a table or view call.
Id
- Category
- This field indicates the category where the Segment is processed. The categories and the
Segments that they contain are processed in the following order:
- Blank: Top category
- R: Repetitive category
- Z: Bottom category
- Segment code
- It is required. It corresponds to the Segment or Logical View name in the COBOL code of the Business Component. It can be different from the name that is stored in the repository. Its value is displayed in the Name column of the table.
- Line number
- This field is numeric. Only one 00 line number (default) is authorized in a Segment. This 00 line is required to enter the physical characteristics of the Segment (external name, organization), the name of the Segment access key, and the Segment code in the repository.
Access key filling
- Previous Segment code
- Enter the Segment that is to be accessed before the Segment code in the program (see the Segment code field in the Id panel). Several Segments can be accessed in each category. Therefore, you can indicate a hierarchy to access the Segments of a category. This field contains the previous Segment in the access hierarchy. This Segment must belong to the same category. If several Segments have the same previous Segment, they are processed alphabetically.
- Each Segment must be linked directly or indirectly to the Logical View that it depends on. It
must include the code of a previous Segment or of its Logical View (S
organization).Exception: The Segment that is dedicated to the error messages must not include the previous Segment. A Logical View cannot have a previous Segment.
- Reception
- You specify the way that the Segment is used in the validation and update processing. Select an
option in the list.
Table 1. Values of the use of a Segment in the validation and update processing Options Description No value or N: Not used For an organization different from X, S, and 2, no access is generated for this Segment in the validation and update processing (default). For a 2 or X organization, no Server call is generated.
L: Read For an organization different from X, S, and 2, a simple read command is generated for the Segment. For a 2 or X organization, a Server is called for selection.
E: Existence validation For an organization different from X, S, and 2, an existence validation is run. A read command with the setting of an error code is generated (if it is not found). For a 2 or X organization, a Server is called for validation.
M: Update (modification) For an organization different from X, S, and 2, the Segment is updated (modification only). For a 2 or X organization, a Server is called for validation and update.
X: Update (creation and modification) For an organization different from X, S, and 2, the Segment is updated (creation and modification only). For a 2 or X organization, a Server is called for validation and selection.
S: Update Segment (deletion only) For an organization different from X, X, S, and 2, the Segment is updated (deletion only). C: Update Segment (creation only) For an organization different from X, X, S, and 2, the Segment is updated (creation only). T: Update (creation, modification, and deletion) For an organization different from X, S, and 2, the Segment is updated (creation, modification, and deletion). In these cases, the existence validations and the update statements that correspond to the selected options are generated. If the Segment is related to a previous Segment, regardless of the indicated use, only the update commands for modification and creation are generated.
For a 2 or X organization, a Server is called for validation, update, and selection.
U: Call of a user service For a 2 or X organization, a user service is called.
- Reception
- You specify the way that the Segment is used in the validation and update processing. Select an
option in the list.
Table 2. Values of the use of a Segment in the validation and update processing Options Description No value or N: Not used For an organization different from X, S, and 2, no access is generated for this Segment in the validation and update processing (default). For a 2 or X organization, no Server call is generated.
L: Read For an organization different from X, S, and 2, a simple read command is generated for the Segment. For a 2 or X organization, a Server is called for selection.
E: Existence validation For an organization different from X, S, and 2, an existence validation is run. A read command with the setting of an error code is generated (if it is not found). For a 2 or X organization, a Server is called for validation.
M: Update (modification) For an organization different from X, S, and 2, the Segment is updated (modification only). For a 2 or X organization, a Server is called for validation and update.
X: Update (creation and modification) For an organization different from X, S, and 2, the Segment is updated (creation and modification only). For a 2 or X organization, a Server is called for validation and selection.
S: Update Segment (deletion only) For an organization different from X, X, S, and 2, the Segment is updated (deletion only). C: Update Segment (creation only) For an organization different from X, X, S, and 2, the Segment is updated (creation only). T: Update (creation, modification, and deletion) For an organization different from X, S, and 2, the Segment is updated (creation, modification, and deletion). In these cases, the existence validations and the update statements that correspond to the selected options are generated. If the Segment is related to a previous Segment, regardless of the indicated use, only the update commands for modification and creation are generated.
For a 2 or X organization, a Server is called for validation, update, and selection.
U: Call of a user service For a 2 or X organization, a user service is called.
- Access key source
- This field can be used as a working area (ww10-delco for example) or a
literal (02 for example).Note: The key loading for the lists must always be performed from the 1- area in the Servers if the key is in the repetitive category of the Logical View.
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.
If you put the cursor from the first to the fourth position of the field, the content assist wizard first displays the list of Segments. Select one of them, then click the field again and press Ctrl+Space again. The content assist then displays the list of Data Elements. Select one of them.
Primary access key
You select a Data Element or you enter the name of a new Data Element that is to be used as the primary access key to the Segment. It is used to generate the RECORD KEY clause. For a VSAM file (V organization), it must be entered on the Segment 00 line. The Data Element that is specified in this field is considered as a group Data Element, except for SQL organizations where it is considered as an elementary Data Element.
- Data Element
- Specify the Data Element that is used as an access key to the Segment. You can select a Data
Element or change the called Data Element by clicking Change. A selection
wizard opens with the Data Elements that are called in the Segment. Select one of the Data Elements
and click OK. In the table, it is displayed in the Access
key column.
You can also specify the Data Element directly from the Access key column.
Two methods are possible:- Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
- Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.
- Undefined Data Element
- If the primary access key is a group Data Element, and if different values are given to the individual members of that group, enter the elementary Data Elements of the group in the Undefined Data Element field.
For a Table (G organization), you select a subsystem by indicating the value NUSSY in this field. The associated key (G-ddss-NUSSY) is generated.
For SQL database Segments, a key element must be entered on each line where the value of the Display field is not N.
In generated access level, the Segments are selected when the keys are equal for an update or a direct read. For a sequential read in the repetitive category, the Segments are selected when their keys are equal or greater.
A Segment cannot contain more than 10 key Data Elements.
If the error message Segment is an SQL/DS Segment or if it has a V or W organization, the Data Element key must be ERKEY.
Logical characteristics
- Generation limitation
- In the list, select the generation limitation of the logical accesses to Segments.
- Automatic.
The logical access is generated automatically, according to the use of the Segment.
- U: User-defined Segment.
The Segment access is described by the user (organization different from S).
- P: No description of Segment.
The Segment access is not described (organization different from S).
- Automatic.
- Control break
- Select the control break indicator.
Table 3. Possible values for the control break. Options Description No control break. No control break for organizations different from S. It indicates that a Data Element that belongs to a key in the repetitive part must remain constant during the selection.
C: display break Display break for organizations different from S. It indicates that a Data Element that belongs to a key in the repetitive part must remain constant during the selection.
E: Selection for control break (SQL) For an SQL organization, it generates an equal condition in the WHERE clause of the SQL DECLARE CURSOR statement. R: Large read (Folder) This option is available with Segments whose organization is H, D, or V. It must be selected to specify a large reading, such as the display of all the lines of all the orders, for each Segment that is associated with the Logical View. You must select the value R on each key Data Element that corresponds to a key Data Element of the Logical View. The Logical View must belong to the Folder root node if a Folder is implemented.
- Subschema
- This field is used with the Pactables function to indicate which subschema is to be described.
You must select either All Data Elements or a description from 0 to 9. The
value 0 corresponds to subschema 10. A subschema is a group of Data Elements that are present in the
Segment composition.
- For the G-type (Table) or H-type (relational database) organizations, this field indicates the number of the Table subdescription or subschema that the input/output area description corresponds to. If the called Segment corresponds to a view and no subschema is specified, the value is specified on the Block -DR Lines.
- For the V-type (indexed) organization, you use this field to specify the
secondary access keys to indexed files:
- The secondary key is specified with the value 2. The primary key must be indicated on the 00 line of the Segment without a use in display or reception, even if it is not used, to generate the RECORD KEY clause. If the secondary key is a group field, the number of the subschema must be indicated for this group area only.
- The value 3 indicates that the secondary key is
DUPLICATE.Note: This specification is not implemented in the CICS® variant because the declaration of the secondary keys is performed in the VSAM definition.
- Generate level
- Not used for a Business Component.
Physical characteristics
- Organization
- It corresponds to the organization of the Segment. The values that are entered at this level are
the physical characteristics of the Segment. The type of organization is required for the 00 line
number of the Segment. Select a type of organization in the list.
Table 4. Segment organizations in a Server Options Description V: Indexed Segment with an indexed organization. G: Table type Table-type Segment. In this case, the generated access corresponds to the call of the Pactables general module. H: Relational database accessed with SQL Segment of a relational database that is accessed with SQL. The Segment description and physical accesses are generated. For Segment access in the repetitive category, the cursor declarative is also generated. D: DL/1 DL/1 Segment. A: ADABAS type ADABAS Segment. Only one description in the WORKING-STORAGE SECTION is generated. W: Managed by procedures, display keys positioned The Segment access is managed by specific processing. Only one description in WORKING-STORAGE SECTION is generated. In the -CS Lines of the Server Dialog, this value calls the user buffer Segment. S: Call of the Logical View Call of the Logical View. X: Server call for validation and selection Call of a Business Component. All the Segments that are called in the repetitive category and in the selection service must be of the same type. Segments with an X organization cannot be combined with Segments with other organizations. 2: Call of a Business Component instance by instance Call of a Business Component instance by instance.
- Description type
- The Description type field contains values that generate, from the Segment description in the repository, different descriptions in the generated COBOL code. The following values can be selected:
- Conventional (fixed) (default value) for a Segment that might have a specific part. For example, it can be a Data Structure with a Segment.
- 1: Database Segments for a Segment without any common part. For example, it can be, for a database, various Segments that are defined in the same Data Structure.
- E: Table type for Table-type Segments. The input format of the Data Elements that are called in the Segment is taken into account.
- 2 : Conventional (variable) for a complete Segment with a variable length for an indexed organization (V). The generated description can vary according to the generation variant.
- External Name
- It is the external name of the file. The default value is the first 2 characters of the Segment
in the Server.
- For a V (indexed) organization, its value varies according to the type of COBOL:
- For IBM CICS-VSAM, it is the DDNAME (1 - 8 positions).
- For GCOS8-TP8, its value depends on the blocking type:
- If blocking by characters, it corresponds to the external name on 4 characters (generated in the SELECT clause) and blocking on the last 4 characters (generated in the FD clause).
- If blocking by record, it corresponds to the external name on 5 characters and blocking on the last 3 characters. The two parts of the external name, each on 2 characters, are separated by a blank.
- For the other types of COBOL, it is the logical name, which is generated in the SELECT clause.
- For an H (SQL) organization, enter the SQL Database Block where the table
is described.
At generation time, the external name of the table or view is searched for in the Block description. If it is not found, the external name is taken from the Segment Definition
- For a G (Pactables) organization, its value varies according to the COBOL type:
- In CICS, it is the 4 characters for the DDNAMEs of the files that are managed by Pactables. These characters are the transaction code that is used to access Pactables files.
- In IMS, it is any number of characters that build the names of the two PCBs that are associated
with the Pactables Tables. The resulting names are formatted as in the following examples:
- xxxxxxD for the PCB of the description database.
- xxxxxxV for the PCB of the contents database.
These names cannot exceed 6 characters.
The PCBs must belong to the PSB of the Screen.
- For a D (DL/1) organization, it corresponds to the PCB code.
- For an S (Logical View) organization, its value is by default the Data Structure code.
- For an X or a 2 organization, it corresponds to the called Business Component.
- For a V (indexed) organization, its value varies according to the type of COBOL: