Rational Programming Patterns

CS lines - Segment call

To display the contents of the Segment call section, you must select a Segment line in the -CS Lines list or click the Add Segment call button. In this section, you enter information identifying the Segment, then the logical and physical characteristics of the Segment (external name, organization), and all the other use characteristics (use, access key source).

Segment

Segment
Field to be entered when the Segment code in the Screen or Dialog is different from the Segment code stored in the repository. You can change for another Segment name by clicking the Change button. If you click the Segment link, you switch to the Segment editor Overview tab.

Database

Database Block
Here you can select a Database Block name by clicking the Change button.

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.
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
N or Blank: 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
N or Blank: 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 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

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.
Table 3. Organization values for the Segment
Options Comments
None No comment
V: Indexed Segment organization: Indexed

The description of data is generated. The access orders for reception and display procedures are entirely generated according to the logical access procedure and the use.

D: DL/1 DL/1 Segment.

The description of data is generated. The Segment access orders for the reception and display processing are entirely generated, according to the type of logical access processing and use.

G: Table-type Table type Segment.

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

A: ADABAS-type ADABAS type Segment.

In this case, the Segment description is generated, but no access is executed. Generation of the control block and buffers used in the accesses

T: Total-type Total type Segment.

The description of the Segment is generated but no access is executed.

2: DB2 or VAX SQL DB2 or VAX SQL Segment generation and description. Only local accesses are not generated. The structure of variable indicators corresponding to the columns of a DB2 or VAX SQL table is always generated.

For all the Segments of a relational database accessed through SQL: The Segment description and physical accesses are generated. For Segment access in the repetitive category, the cursor declarative is also generated.

C: INTEREL RBBC or RFM Relational database with SQL access
O: ORACLE V5 Relational database with SQL access
P: ORACLE V6 or V7 Relational database with SQL access
Q: SQL/DS, ALLBASE/SQL, DB2/2, or DB2/6000 Relational database with SQL access
S: DB2 or VAX SQL Relational database with SQL access
R: RDMS Relational database with SQL accesses: the description of the Segment and the physical accesses are generated.

Other related information required: A Database Block code is required, you must indicate the SQL object type (description type field) and the primary access key.

4: SQL 400 SQL 400
7: TURBO IMAGE For a TURBO IMAGE organization.

Other information required: the name of the TURBO IMAGE Block and primary access key are required.

N: NONSTOP SQL For this relational database, the description of the Segment and the physical accesses are generated
M: DATACOM/DB Relational database with SQL access
I: INFORMIX, INGRES, SYBASE, SQL SERVER Relational database. The description of the Segment and the physical accesses are generated
U: Managed by procedures Physical access to the Segment managed by specific procedures.
W: Managed by procedures, fill display keys Segment access is managed by specific procedures and the display keys are automatically filled in (functions F40 and F60).
Y: IBM 38, UNISYS 2200 Database organization. Value used with IBM SYSTEM 38. UNISYS 2200: SFS indexed organization.
Description type
This field defines the type of Segment in use. Select one of the following options in the list:
Table 4. Description types for the Segment
Option Comments
Conventional (fixed) Conventional and multi record files of fixed length

This type of Segment will be appended to the '00' (common key) Segment.

1: Database Segments Database Segments

Those whose keys are not isolated in a separate Segment. (default value for a DL/1 Segment, organization 'D' or for a Table, organization 'G') .

E: Table-type Table type Segments:

The input format of the Data Elements called in the Segment is taken into account.

2: conventional (variables) Conventional and multi record files of variable length

This type Segment will be appended to the '00' (common key) Segment.

For Type P organization (ORACLE V6) and Type I organization (SYBASE): automatic generation of CONNECT AT database, DECLARE database and access SQL AT database.

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 DL/1 Segment, it corresponds to the PCB name.
For SQL, it is the code of the called SQL View.
For other variants, it corresponds to the SELECT clause in the generated program.

Terms of use | Feedback

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