CS lines - Server call

You can call a Server from a TUI client Screen for a validation and selection service. To display the contents of the Server call section, you must select a Server line in the -CS Lines table or click Add a Server call.

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.
Server
Specify a Server. To do so, click Change. A selection wizard opens with the Servers that can be selected. Select or create a Server and click OK. In the table, it is displayed in the Server column.

You can also specify the Server directly from the Server 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.

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 generated COBOL code. It can be identical to 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 code of 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.
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.
Display
You specify the way that the Segment is used in the display processing. Select an option in the list.
Table 2. Values of the use of a Segment in display
Options Description
No value or N: Nor used For an organization different fromX, S, and 2, no access is generated for the Segment in the display processing (default option).

For a 2 or X organization, no Server call is generated.

A: Used in display For an organization different fromX, S, and 2, the access is generated for the display according to the type of logical access processing. If the previous Segment code is blank and the Segment is used, the key is saved in the conversation area.

For a 2 or X organization, a Server is called for selection (not compatible with the L value in reception).

U: Call of a user service For a 2 or X organization, a user service is called.
Access key source
In this field, you can indicate a Screen field, a literal, or a working area.
Example:
  • 0001-delco for a Screen field, or I-0001-delco for an input field (reception). In this example, 0001 is the Screen and delco is the Data Element.
  • 02 for a literal.
  • ww10-delco for a working area. In this example, delco is the Data Element.

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 content assist 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.

The content assist also displays the list of the Data Elements after a dash from the seventh position (I-ww10-delco for example).

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
Select the generation limitation of the logical access level 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 X).

  • P: No description of Segment.

    The Segment access is not described (organization different from X).

Control break
You can indicate that a Data Element that belongs to the key in the repetitive part must remain constant upon the display or selection of a list. Only the records that have this key value are kept. You must then specify a control break.
Table 3. Possible values for the control break.
Options Description
No control break No control break is specified for the display or the selection.
C: display break A control break is specified for the display or the selection.
E: display break (SQL) For an SQL organization, it is a display control break. It generates an equal condition in the WHERE clause of the SQL DECLARE CURSOR statement. It replaces >=, which is generated otherwise.
R: Large reading of the Folder (Server only) 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 accessed through SQL) 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:
    • All the Data Elements of the Segment
    • Subdescription or subschema 0-9

  • For the V-type (indexed) organization, it is 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 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 at the VSAM definition.
Generate level
In this field, you enter the levels of the generated subfunctions. For the values between 06 and 98, the processing that depends on the use (in reception and display) of the Segments that are used in this Screen is automatically generated in the Business Component that is associated with the client component. The default hierarchical level of these subfunctions is 10.

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 TUI Client
Options Comments
V: Indexed Segment with an indexed organization.
G: Table type Table type Segment.

The generated access corresponds to the call of the general module of the Pactables function.

H: Relational database accessed with SQL Segment of a relational database that is accessed with SQL.

The Segment description and the physical accesses are generated. The cursor declaration is generated for the Segments of the repetitive category.

W: Managed by procedures, display keys positioned The Segment access is managed by specific processing. The display keys are automatically filled in (functions F40 and F60).
X: Server call for validation and selection Server call for validation and selection.
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
The default value corresponds to the first 2 characters of the Segment in the program. The content of the field depends on the organization.
  • 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, it is the external name (4 characters), which is generated in the SELECT clause.
    • The blocking factor (last 4 characters) is generated in the FD clause.
    • For the other types of COBOL, it contains the logical name, which is generated in the SELECT clause.
  • For an H (SQL) organization, it is 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 organization, in CICS, it corresponds to the 4 characters of the DDNAMEs of the files that are managed by Pactables. These characters are the transaction code that is used to access Pactables files.
  • For an X organization (Server call), it is the called Business Component.

Feedback