Rational Programming Patterns for System z

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 you are using. For this Logical View, you must indicate the accessed Segments of a file, a table, or an SQL view. In the Segment call section, indicate, for each Segment, the processing category (before repetitive, repetitive, and after repetitive), the type of logical access processing (validation, update and selection) to perform on the Segment and the key filling mode, the use in the generated processing, the access condition, and the physical organization.

The number of Segment description lines called in this tab is limited to 100 per category.

Note: The Segments which have the same Data Structure code must have the same organization, the same description type and, for a V-type organization, the same external name.

Segment

This field contains the code of the Segment called in the Business Component. The selected code can be identical to the code present in the database.

The 'EM00' value is reserved for the call of the error message file in an error message server (E-type).

Database

Database Block
Select the code of the Database Block that contains the external resource called in the Business Component by clicking Change. To remove the Database Block name from this section, click Remove. Clicking the code opens the Database Block editor.

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 indicated),

  • 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 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 which 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 which correspond to databases or files.
Each Segment must be linked directly or indirectly to the Logical View on which it depends. It must include the code of a previous Segment or of its Logical View (S organization).
Exception: The error message Segment must not include the previous Segment. A Logical View cannot have a previous Segment.
Reception
Here you specify the way the Segment is used in the validation and update processing. Select an option in the list. For an 'S' organization, the Reception field is set to 'blank', the default value.
Table 1. Values of the use of a Segment in the validation and update processing
Options Description
N or Blank: For an organization different from 'X' 'S' and '2': No access statement is generated for this Segment in the validation and update processing (default).

For an 'X' or '2' organization: No Server call is generated.

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

For an 'X' or '2' organization: Server call for selection.

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

For an 'X' or '2' organization: Server call for validation.

M: For an organization different from 'X', 'S' and '2': Updated Segment (modification only).

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

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

For an 'X' or '2' organization: Server call for validation and selection

S: For an organization different from 'X', 'S' and '2' only: Updated Segment (deletion only).
C: For an organization different from 'X', 'S' and '2' only: Segment (deletion only)
T: For an organization different from 'X', 'S' and '2': 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' or '2' organization: Server call for validation, update, and selection.

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

For an 'X' or '2' organization: No Server call is generated.

A: For organizations different from 'X' 'S' and '2': 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.

For an 'X' or '2' organization: Server call for selection (not compatible with the 'L' value in reception).

U: For an 'X' or '2' organization only: Call of a User service
Access key source
This field can be used as a working area or a literal.
Example:
  • 02 for a literal,
  • ww10-delco for a working area.
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.

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 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 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 (organization different from S).

  • P: No description of Segment:

    Segment accesses not described (organization different from S).

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, belonging 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, belonging to a key in the repetitive part, must remain constant during the selection.

E: Selection for control break (SQL) For an SQL organization: it causes the generation of an equal condition in the WHERE clause of the SQL DECLARE CURSOR statement.
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 sub description (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
Not used for a Business Component.

Physical characteristics

Organization
An option is required for the '00' line number of the Segment. The options available in the list are presented in the Table 4 table.
Table 4. Values for the organization field
Options Description
V Segment organization: Indexed.
G Table-type Segment. In this case, the generated access corresponds to the call of the Pactables general module.
H Segment of a relational database accessed with SQL: The Segment description and physical accesses are generated. For Segment access in the repetitive category, the cursor declarative is also generated. The type of the relational Database Block is required on the Database Block definition, in the External name field.
D DL/1 Segment
A ADABAS Segment
A Only one description in the WORKING-STORAGE SECTION is generated.
W Segment accesses managed by specific procedures. Only one description in WORKING-STORAGE SECTION is generated. In the -CS Lines of the Server Dialog, call the user buffer Segment.
S Call of the Logical View.
X 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
Note: The error message file can be attributed with the following organizations:
  • V: its external name and its code in the database are not validated.
  • W: WORKING - no access generated.
  • H: SQL - the external name corresponds to the Database Block code (containing the relational database) indicated in the Segment field. The description and the accesses will be generated under the name corresponding to the Library code.
Description type
You can obtain different descriptions in the generated program, from the Segment description in the database. The possible values for the description type are presented in the Table 5 table.
Table 5. Description type
Options Description
Conventional (fixed) Complete Segment (common and specific parts).
1: Database Segments Specific part only (forced value for a Logical View, DL/1 Segment, or SQL table).
E: Table-Type Table-type Segments: The input format of the Data Elements called in the Segment is taken into account.
2: Conventional (variables) Complete Segment with a variable length for an indexed organization (V).
Note: The generated description might vary according to the generation variant.
External Name
The default value is the first two characters of the Segment code in the Screen.
  • 'V' (indexed) organization:
    • IBM CICS-VSAM: DDNAME (1 - 8 positions).
    • GCOS8 - TP8:
      • If blocking by characters: external name on four characters (generated in the SELECT clause) and blocking on the last four characters (generated in the FD clause).
      • If blocking by record: external name on five characters and blocking on the last three characters. The two parts of the external name, each on two characters, are separated by a blank.
  • Other variant: Logical name, generated in the SELECT clause.
  • 'H' (SQL) organization:

    Code of the SQL Database Block in which the table or view is called. You can select a table or view by specifying a T or V after the code of the selected Block. A space must be left between them.

    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

  • 'G' (Pactables) 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.
    • In IMS: Any number of characters that build the names of the 2 PCBs associated with the Pactables Tables. The resulting names are formatted as in the following examples:
      • xxxxxxD: PCB of the description database.
      • xxxxxxV: PCB of the contents database.

      These names cannot exceed six characters.

      The PCBs must belong to the PSB of the Screen.

  • 'D' (DL/1) organization:

    Enter the PCB code.

  • 'S' (Logical View) organization:

    By default, this field displays the Data Structure code.

  • 'X' or '2' Organization:

    Enter the code of the Business Component.


Terms of use | Feedback

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