Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Managing IDMS/DB Data Definitions : Task F  Define CA‑IDMS Elements

Task F  Define CA‑IDMS Elements
After choosing CA‑IDMS records, you must define elements for each of the CA‑IDMS records. This is done from the IDMS/DB Elements screen, shown in the following illustration. You access this screen pressing PF5 from the IDMS/DB Set Connections screen.
This Table Definer screen displays a list of IDMS/DB elements under Field Name:

 
COMMAND==> TABLE DEFINITION
Table: EMPLOYEESS Type: IDM Unit: PHG00
Location Parm Typ Syn Len Dec Default ' Event Rule Typ Acc
---------------- --- --- --- -- ---------------- ' ---------------- - -
LOCATION I C 16 0 ' _
' _
|------------- Metadata Definition ------------- | IDMS Def >
Field Name T S Len Dc Reference Default |Ky Ix S Le
- ---------------- - -- ----- -- ---------------- -----------------|-- -- - ---
_ EMPLOYEE |
K EMP_ID B 2 0 | 1 M
_ EMP_FIRST_NAME C 10 0 | 2 C
_ EMP_LAST_NAME C 15 0 | 1 C
_ EMP_STREET C 20 0 | C
_ EMP_CITY C 15 0 | C
_ EMP_STATE C 2 0 | C
_ EMP_ZIP_FIRST_FI C 5 0 | C
_ EMP_ZIP_LAST_FOU C 4 0 | C
_ EMP_PHONE P 6 0 | M
K-Key P-Parm S-Select
PFKEYS: 1=HELP 3=SAVE 12=RETURN 4=CANCEL

 
The IDMS/DB Elements screen is divided into three segments:
Header segment
Location Parm & Event Rule segment
Element segment
Provides an area to select elements to be changed from the CA‑IDMS Record and the Set Connections screens. Refer to Selecting Elements for more information.
The procedures for the Location Parm, Event Rule, and Element segments are described below.
Specifying a Location Parameter
You use this section of the Table Definition screen to define a location parameter for an IDM table. You use a location parameter to access CA‑IDMS data through a peer Gateway associated with another Data Object Broker (remote node). If you do not need to access remote data, blank out the location parameter name to delete the parameter. If you always access CA‑IDMS data remotely, the node from which you request the access can have either a minimal or a full definition.
Minimal Definition
A minimal definition consists of the following:
The location parameter, which must be the same at both locations. The name of the remote node where the full definition is located must be supplied in the Default field, Src field, or Src and Sourcename field.
The table type specified in a minimal definition does not have to match the table type of the full definition on the remote node. A minimal definition with a location parameter means you always access data at a remote node.
Full Definition
A full table definition with a location parameter means you can access data at either the local or the remote node. Define data parameters on the full definition, not a minimal definition.
The table type of the full definition must match the data on the local node. For example, a full definition of type TDS used to access data on the local node can also be used to access an IDM table with the same name on a remote node.
See Also
TIBCO Object Service Broker Managing Data for more information on location parameters and minimal table definitions.
Specifying Event Rules
Event rules enable you to validate data and automatically trigger other events based on specific update and/or retrieval access to IDM tables. Event rules are always called when the table is accessed in the type of access specified. All rules applying to a specific access are executed in the order they appear in the scrollable Event Rule segment of the TIBCO Object Service Broker IDMS/DB Elements screen.
Defining Fields
You define the fields in the Event Rule segment as follows:
 
 
No database updates are allowed during the validation process. The rule must be a function that returns Y (yes) if the validation is successful, N (no) if the validation is not successful, or a message explaining why it is not successful.
There are no restrictions on coding, other than the rule must not be a function, it cannot change the contents of the triggering row, and it cannot use the TRANSFERCALL statement. Nested triggers are possible.
 
 
See Also
TIBCO Object Service Broker Managing Data for more information on specifying event rules.
Selecting Elements
The Element segment is divided into two areas: the Metadata Definition and the IDMS Definition areas. You can change any of the fields in the Metadata Definition area. The IDMS Definition area is for display purposes only.
Metadata Definition Area
The Metadata Definition area contains the following fields:
Field Name
The default field name. Each CA‑IDMS element name is converted to a valid TIBCO Object Service Broker name. Refer to Conversion of Record and Element Names for details about how element names are converted to field names.
You can type over an entry in this column with a new name to uniquely identify the field within the IDM table. You can use the same name as a field in another table. If you are moving data between this table and another table, giving fields the same names simplifies the process.
A character string (unique to the IDM table definition) of up to 16 characters beginning with a letter (A - Z) or a special character (@, $, or #), and continuing with more letters, special characters, digits (0 - 9), or underscore characters (_).
Displays the TIBCO Object Service Broker semantic data type of the element. For valid semantic data types, refer to the TIBCO Object Service Broker Programming in Rules manual.
Displays the TIBCO Object Service Broker syntax of the element. The Table Definer also automatically assigns the TIBCO Object Service Broker length for each element. Refer to Conversion of Data Types for more information.
Displays the maximum number of character positions (including the decimal point, the mantissa, and others) that a value in the field of this element can occupy.
Supply the name of a reference table for the field if required. Refer to the TIBCO Object Service Broker Managing Data manual for more information.
Supply a default value for the field if required. This default value is used if there is no other value specified for the field.
IDMS/DB Definition Area
The IDMS/DB Definition area contains the following fields for display purposes only:
Indicates if the field is a single primary key or part of a composite primary key of the record. A single primary key is represented with a 1. Composite primary keys are numbered in the order in which the primary key is composed.
A D in this field indicates that the element is a DB key, a unique identifier for every record. This key is automatically appended as the last element of each record, and assigned the same name as the record. The DB key must be included as an element in the record.
Note  You can select this element as the primary key.
Indicates if the element is part of a secondary index. The numbering of these fields indicates the order of the fields that comprise the secondary index.
Note  You must press PF11 to view this field.
Displays a Y if the element is from the second occurrence of the record in the table of a Bill of Materials structure.
Displays the element name contained in the record listed in the Record Name field. The last element of each record is a DB key that is automatically created and used to uniquely identify the record.
Using Line Commands
The following line commands are valid from the IDMS/DB Elements screen:
Elements that are to be the primary key fields. Each IDM table definition must have a primary key. The Table Browser supports up to eight composite primary keys. Use rules to access IDM tables with more than eight primary keys.
The primary key must be defined on elements from the first record in the access path. If the first record in the access path has a CALC key or index, you should select only elements of the CALC key or index as the primary key. If the first record in the access path does not have a CALC key or index, you can select any element as the primary key, up to 16 elements.
You can select only one element from the second-level record in the access path as the primary key. A primary key and a parameter cannot be selected from the same record; therefore, definitions that have only one record cannot be parameterized.
Note  You cannot define a primary key on an element that is in a record accessed using an OBTAIN OWNER (OO) directive.
You can select only CALC keys as parameters, and parameters can be defined only on the first record in the access path. Since a parameter and a primary key cannot be selected from the same record, definitions that have only one record cannot be parameterized.
CALC keys are identified by a number in the Ky field. If the CALC key is composed of more than one element, ensure that you select them all as parameters. You can use up to four parameters for a table definition in TIBCO Object Service Broker; therefore, if the CALC key contains more than four elements, you can select only its elements as primary key fields, or as fields of the table.
The number of fields you can select is dependent upon the length of the sum of all fields, primary keys, data parameters and control information. This sum must be less than or equal to 3915 bytes. For an explanation of the formula used to calculate the total number of bytes of all fields, refer to the TIBCO Object Service Broker Programming in Rules manual.
The number of fields you can access is dependent upon the CTABLESIZE Data Object Broker parameter; however, you use the Table Definer to select all IDMS/DB elements as fields. You can use the ESTIMATETBLDFN tool, described in Estimating the CTABLESIZE Parameter, to estimate the size of this parameter.
You can change existing line commands by typing over them or, if you decide not to include a currently selected IDMS/DB element, you can de-select it by typing a blank over the line command. Press PF3 to return to the initial IDM table definition screen where you can verify your access path.
Elements Screen PF Keys
You can use the following keys from the IDMS/DB Elements screen:

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved