CS lines - Server call

You can call a Server from a TUI client Screen for a validation and selection service. The characteristics of the Server call are to be indicated in the Server call section of the -CS Lines tab.

Segment

You must use a Segment or a Logical View to call a Server.

Segment
Select a Segment by clicking Change . It is the Segment code indicated for the TUI client. The code can be identical to the Segment code in the database. The EM00 value is reserved for the call of the error message file. This Segment is called by the TUI client Dialog.
Note: You can call this file in the error message server. If so, you must define and describe the Segment first that corresponds to this file. For more details, read the online help associated with the Server calls in a TUI client Screen/Dialog.

For the Logical View code used for the call of a Business Component (X-type organization), the code must be identical to the code used in the associated Business Component.

If you click the Segment link, you switch to the Segment editor Overview tab.

Server

Here you can select or change a Server name by clicking Change , or remove a Server name from the Server call section by clicking Remove.

Id

Category
This field indicates the Screen category in which the Segment is processed. The category, and therefore the corresponding Segments are processed in the following order:
  • Blank: Top category:

    Segment belonging to the Screen top.

  • R: repetitive category:

    Segment belonging to the repetitive category (as many times as there are repetitions),

  • Z: Bottom category:

    Segment belonging to the Screen bottom.

Segment code
This field must be entered when the Segment code in the Screen is different from the Segment code that is stored in the repository.
Line number
Only one 00 line number (default) is authorized in a Segment. This zero line is required to enter the physical characteristics of the Segment (external name, organization), the name of the Segment access key and the name of the Segment in the database Library. It is a pure numeric field. The values from 01 to 99 are required for any other references to this Segment.

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, a hierarchy can be indicated concerning the access to the Segments of a category. This field contains the previous Segment code in the access hierarchy. This Segment must belong to the same category. If several Segments have the same previous Segment, they are processed alphabetically.
Note: It is not advised to link Server calls and calls of Segments that correspond to databases or files.
Reception
Here you specify the way 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: For an organization different from X: No access statement is generated for this Segment in the validation and update processing (default).

For an X organization: No Server call is generated.

L: For an organization different from X: A simple read command is generated for the Segment.

For an X organization: Server call for selection.

E: For an organization different from X: Existence validation to run. A read command with the setting of an error code is generated (if it is not found).

For an X organization: Server call for validation.

M: For an organization different from X: Updated Segment (modification only).

For an X organization: Server call for validation and update.

X: For an organization different from X: Updated Segment (creation and modification only).

For an X organization: Server call for validation and selection

S: For an organization different from X only: Updated Segment (deletion only).
C: For an organization different from X only: Segment (deletion only)
T: For an organization different from X: Updated Segment (creation, modification, and deletion). In these cases, the existence validations and the update statements corresponding 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 an X organization: Server call for validation, update, and selection.

U: For an X organization only: User-defined logical accesses
Display
For a use in display, select one of these options:
Table 2. Values of the use of a Segment in display
Options Description
No value or N: For organizations different from X: No order is generated for this Segment in the selection processing (default option).

No Server call is generated.

A: For organizations different from X: Used in selection. The access order is generated for the selection 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.

X organization: Server call for selection (not compatible with the L value in reception).

U: X organization only: Call of a user service
Access key source
This field can be used as a working area, a literal, or Screen field. In the latter, the first four characters of the field must correspond to the code of the Screen in the Dialog.
Example:
  • 0001-delco for a Screen field,
  • 02 for a literal,
  • ww10-delco for a working area.

Primary access key

In this pane, you select a Data Element or you enter the name of a new Data Element (not defined in the repository) that is to be used as the primary access key to the Segment. For a VSAM file (V organization), it must be entered on the Segment 00 line. The Data Element that is specified here is considered as a group Data Element, except for SQL organizations where it is considered as an elementary Data Element.

Data Element
This field contains the code of the Data Element that is used as an access key to the Segment. You can select another code by clicking Change or remove a Data Element code from this field by clicking Remove.
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 code of 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 Use in display field is not N.

In generated accesses, 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.

For an error message file or a Table, 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:

    User-defined Segment access in structure code. (organization different from X)

  • P: No description of Segment:

    No description of Segment. (organization different from X)

Control break
Select the control break indicator in the list:
Table 3. Possible values for the control break
Options Description
No control break. No control break for organizations different from X.

Indicates that a Data Element, which belongs to a key in the repetitive category of a Screen, must remain constant during display.

C: display break Display break for organizations different from X.

Indicates that a Data Element, which belongs to a key in the repetitive category of a Screen, must remain constant during display.

E: display break (SQL) For an SQL organization: Display control break. It causes the generation of an equal condition in the WHERE clause of the SQL DECLARE CURSOR statement (and not >=, which is generated otherwise). The use of CURSOR is optimized in the repetitive category.
Subschema
This field is used with the Pactables function, to indicate which subschema is to be described. You must select either the All Data Elements choice or a description from 0 to 9 (0 corresponds to subschema 10). A subschema is a group of Data Elements present in the Segment composition.
  • For a G-type (Table) or H-type (relational database accessed through SQL) organizations:
    For Tables defined in Pactables, it specifies the number of the Table subdescription (or subschema) to which the input/output area description corresponds. If the called Segment corresponds to a view and no subschema has been specified, the value is specified on the Block -DR Lines tab. The possible values are:
    • All the Data Elements of the Segment.
    • From 0: Sub description 0 to 9: Sub description 9 (or subschema) number (1 - 10, where value 0 corresponds to subschema 10).
  • For a V-type (indexed) organizations, 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, in order to generate the RECORD KEY clause. If the secondary key is a group area, 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 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. It is required in a creation context. The options are presented in Table 4.
Table 4. Organizations available for a Segment
Options Comments
None No comment
V: Indexed Segment organization: Indexed
G: Table-type Table-type Segment.

The generated access corresponds to the call of the Pactables standard access module.

H: Relational database accessed with SQL Relational SQL database Segments accessed by SQL:

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

The type of relational Database Block is required in the definition of the Block whose code must be entered in the External Name field.

Note: Relational organization must be grouped in the -CS Line of the Screen.
W: Managed by procedures, fill display keys Segment access is managed by procedural code. Only one description in the WORKING-STORAGE SECTION is generated.
X: Server call for validation and selection. Server call for validation and selection.
Note: For error message files:
  • V organization: Enter the file external name; the Pacbase code is not validated.
  • W organization: Working. No access generated.
  • H organization: Indicate the file external name. The external name corresponds to the code of the Database Block that contains the relational table indicated in the Database Block code.
  • X organization: Call of the Server that accesses the error message file. The Server code is indicated in the External name.
Description type
With the values available in this field, you can obtain different descriptions in the generated program, from the Segment description in the database. Select one of the following options in the list. The options are presented in Table 5
Table 5. Description type
Option Comments
Conventional (fixed) Complete Segment (common and specific parts).
1: Database Segments Specific part only. (Default value for a table, organization G.)
E: Table-type Table-type Segments: The input format of the Segment Data Elements is taken into account.
2: conventional (variables) Complete Segment with variable length for indexed organization (V).

The generated description might vary according to the generation variant.

External name
The default value corresponds to the first two characters of the Segment code in the program.
  • For a V organization (indexed):
    • IBM CICS-VSAM: DDNAME (1 - 8 positions).
    • GCOS8-TP8: External name (four characters) (generated in the SELECT clause).
    • Blocking factor (last four characters) (generated in the FD clause).
    • Other variant: Logical name, generated in the SELECT clause.
  • For an H organization (SQL):
    • SQL Database Block code, in which the table or the view is called. You can select a table or a view by indicating T or V after the code of the Block. The Block and the type of object must be separated by a blank.

      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 an error message file:

      The external name to enter is the code of the Database Block that contains the relational table indicated in the Database Block code.

      The description and accesses are generated with the relational table code entered in this field.

  • For a G organization:

    In CICS: four characters for the DDNAMEs of the files managed by Pactables. These characters are the transaction code used to access Pactables files.

  • For an X organization (Server call): code of the Business Component.

Feedback