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


Chapter 3 Managing IMS Data Definitions : Task G: Select IMS Fields

Task G: Select IMS Fields
After selecting an IMS database and the required segments, you must select and define all the IMS fields for each selected segment. Before you select fields, you must understand the effects of field selection on IMS processing. Refer to Effects of Field Selection for more information.
To select fields from a segment shown on the IMS Table Definition screen, shown in Task B: Invoke the Table Definer, type an S beside the segment and press Enter. A screen similar to the following appears.
IMS Field Selection Screen

 
Table: CUST_ORDERS Type: IMS Unit: USR40
DB Name: CUSTOMER
Segment: CUSTROOT Min length: 41 Max length: 41
 
----------- IMS ----------|--- Metadata Field --
IMS Name Offset Syn XSyn| Syn Dec Rqd
Metadata Name Idx Len Val |Typ Len Ord
-------- ---------------- -- ----- ----- - - ---- - -- ----- -- - -
_ CUST# N 0 5 C C
_ CUSTNAME N 5 25 C C
_ ODATE N 30 10 C C
_ XPCODE Y 0 9 C C
 
 
 
 
 
 
 
 
 
 
(S=Select K=Key P=Parameter V=Access Value D=Unselect I=Insert)
PFKEYS: 3=END 12=CANCEL 6=VIEW SUB/BASE IX

 
The IMS Field Selection screen is divided into the following sections:
If you insert a new field (using the I line command), you must complete the IMS and the Metadata Field sections. If you select the field, you can modify the Metadata Field section if necessary.
Interpreting the Header Section
The following fields cannot be modified; they appear for information only:
Min Length
For variable length segments, this is the minimum length of the segment in bytes. For fixed length segments, it is the actual length of the segment in bytes.
Note  If Optimize Update = Y, this is the minimum length that must be defined to TIBCO Object Service Broker for each segment starting at the segment where the primary key is defined.
Max Length
For variable length segments, this is the maximum length of the segment in bytes. For fixed length segments, it is the actual length of the segment in bytes.
IMS Field Section
The following fields are protected unless you are creating a field layout definition, in which case you can modify them.
IMS Name
Displays the TIBCO Object Service Broker name for the IMS field that is part of the segment that you are defining. The default is the name in the IMS Name field.
Valid entries include character strings 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(_).
Y specifies that this field is an IMS Secondary Index field. N means it is not. You can specify only a secondary index field to be a key, access value, or parameter, but not a field. You can specify up to five fields as a composite secondary index. Refer to Defining Secondary Indexes for more information.
The offset of the IMS field from the beginning of the segment starting at offset 0. The default is 0. You cannot modify the offset for fields defined in the DBD. You must supply the length when inserting a new field, and it must be within the boundary of the segment.
The length of the IMS field in bytes. The default is 0. You cannot modify the length for fields defined in the DBD. You must supply the length when inserting a new field, and it must be within the boundary of the segment.
Displays the syntax of the IMS field as defined in the DBD. You cannot modify this field, it is for information only. Valid entries:
Specifies whether there is an access value associated with the field. You use an access value to access a subset of the segment occurrences based on the value of an IMS field. Refer to Defining Access Values for more information. Valid entries are:
Identifies the external syntax of the field. This is the syntax the Gateway expects when retrieving IMS data and that the field is converted to when data is sent back to IMS. Refer to the table under Mapping Data Types for valid values.
Metadata Field Section
The following fields are found in the Metadata Field section of the screen:
Specifies the TIBCO Object Service Broker semantic type of the field. You can use any valid semantic type and syntax combination. Valid values are defined in the TIBCO Object Service Broker Programming in Rules manual. Refer to Mapping Data Types for more information.
Specifies the TIBCO Object Service Broker syntax of the field. You can use any valid semantic type and syntax combination. Valid values are defined in the TIBCO Object Service Broker Programming in Rules manual. Refer to Mapping Data Types for more information.
The number of digits to the right of the decimal point. Valid only for syntax P. The number of decimal places must be smaller than twice the length of the field. For syntax B, C, or V, or semantic type C, the value must be 0.
Specifies the order in which occurrences are returned to TIBCO Object Service Broker. If you do not specify a value, occurrences are returned in the order they are retrieved from IMS. Valid entries:
For a qualified GET or FORALL, all segment occurrences matching the selection criteria are retrieved and sorted by the Execution Environment.
For an unqualified GET or FORALL, all segment occurrences are retrieved and sorted by the Execution Environment before data is passed to the rule or tool.
After selecting and defining all necessary fields, press PF3 to return to the IMS Table Definition screen (shown below).
Sample Defined Table Definition Screen

 
COMMAND==> TABLE DEFINITION
Table: CUST_ORDERS Type: IMS Unit: USR40
DB Name:
Server ID: DEFAULT Server Type: IMS Optimize Update:
PSBname: OSTRXDRP Browse PSBname: OSTRXDRQ
Location Parm Typ Syn Len Dec Default Src Sourcename
---------------- --- --- --- -- ---------------- - ----------------
_ LOCATION I C 16 0
Level Segment Name Fields Chosen Order From Segment
-- -------- ---------------- --- --------
_ 0 CUSTROOT PRODUCT# 1 PRODORD
_ 1 ORDER QUANTITY 2 PRODORD
_ 2 PRODORD
Event Rule Type Access Parms Chosen Order From Segment
---------------- - - ---------------- --- --------
_ CUSTNO 1 CUSTROOT
_ ORDER# 2 ORDER
_
PFKEYS: 3=SAVE 12=CANCEL 22=DELETE 13=PRINT 6=CHILD SEGMENTS 2=DOC 4=DB NAMES

 
On the IMS Field Selection screen, shown in Task G: Select IMS Fields, place the cursor beside the IMS field you want to select and use one of the following line commands:
The number of fields you can define depends upon the length of the sum of all fields, primary keys, and data parameters and control information. This sum must be less than or equal to 3915 bytes. For a detailed explanation of the formula used to calculate the total number of bytes of all fields, refer to the TIBCO Object Service Broker Managing Data manual.
The number of fields you can access depends upon the CTABLESIZE Data Object Broker parameter. You use the ESTIMATETBLDFN, rule described in Estimating the CTABLESIZE Parameter, to estimate the size of this parameter.
Selects a field to be a parameter. You can choose up to four IMS fields as parameters, usually from four different segment levels. The fields you select appear on the initial IMS Table Definition screen in the Parms Chosen segment of the screen. 1
Removes a field from the IMS table definition. For a new field that added using the I line command. This line command deletes the field.
Inserts a field into the IMS table definition after the field where the cursor is positioned. You must provide the values for the IMS field and MetaStor field sections of the definition. These fields cannot overlap in a segment; if they do, no updates are permitted.
The S6BIMSU extract program extracts the characteristics of all fields defined in the DBD as described in Task A, Extract IMS database information. Use the Max Length, IMS Off, and IMS Len fields to determine if all fields are defined in the DBD. If fields are missing from the definition, consider inserting these fields (referring to the appropriate copy library member for the full definition); refer to Replace (Update) Processing and Insert Processing for more information.

1
To use an IMS secondary index to retrieve IMS data, you must select the index field (identified with a Y in the Idx field) as a parameter or access value. The database PCB defined in the Gateway PSB must also contain a PROCSEQ or INDICES parameter. Refer to Defining Gateway Program Specification Blocks for more information.

If necessary, you can modify the display order of all selected fields and parameters, except for the primary key field (denoted by a 1 in the Order field of the Fields Chosen area of the screen). To change the order, type new numbers into the Order field in either the Fields Chosen area and the Parms Chosen area and press Enter.
After selecting the necessary IMS fields, press Enter to display the default name, type, syntax, and length of these fields in the TIBCO Object Service Broker Field segment. A screen similar to the one shown below appears.
IMS Field Selection Screen

 
Table: CUST_ORDERS Type: IMS Unit: USR40
DB Name: CUSTOMER
Segment: CUSTROOT Min length: 41 Max length: 41
----------- IMS ----------|--- Metadata Field --
IMS Name Offset Syn XSyn| Syn Dec Rqd
Metadata Name Idx Len Val |Typ Len Ord
-------- ---------------- -- ----- ----- - - ---- - -- ----- -- - -
_ CUST# CUST# N 0 5 C C S C 5 0 Y
_ CUSTNAME N 5 25 C C
_ ODATE N 30 10 C C
_ XPCODE Y 0 9 C C
 
 
(S=Select K=Key P=Parameter V=Access Value D=Unselect I=Insert)
PFKEYS: 3=END 12=CANCEL 6=VIEW SUB/BASE IX

 
See Also
TIBCO Object Service Broker Parameters about the CTABLESIZE Data Object Broker parameter.

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