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


Chapter 3 Managing IMP Data Definitions : Task E: Define Fields

Task E: Define Fields
This task is used to define the external import and internal TIBCO Object Service Broker attributes for the primary key fields and non-key fields of the table.
Field Definition Segment
This example illustrates the fields used to define the fields of the import table:

 
-------- IMP --------|--------- Metadata Definition ------
Field Name Xsyn Xlen Xdec Offset Key Typ Syn Len Dec Ord Rqd Default
---------------- ---- ----- -- ----- - - -- ----- --- - - ----------
_ EMPNO C 5 0 I C 5 0
_
_
_
_

 
When defining fields, you can type in external import attributes and the TIBCO Object Service Broker attributes default to the external values, or vice versa.
The number of fields you can access is dependent upon the Data Object Broker parameter CTABLESIZE. You can use the ESTIMATETBLDFN tool to estimate the size of this parameter.
Specifying External Import Attributes
The following fields are used to specify the external import attributes. Use PF1 to see valid values for each field:
 
This field contains the name of the import field. It must be a unique name within the table. You can use the same name as a field in any other table; if you are moving data between this table and another table, giving fields the same names simplifies the process.
This field contains the external syntax for the import field. If not specified, the Xsyn field defaults to the specified TIBCO Object Service Broker syntax (Syn field). On Open Systems, numeric external syntaxes are treated as C or V for TEXT files. For information on external syntax, refer to Appendix A, Mapping Data Types.
This field contains the external length for the import field. If not specified, the Xlen field defaults to the specified TIBCO Object Service Broker length (Len field). For information on external lengths, refer to Appendix A, Mapping Data Types.
On Open Systems platforms, the Xlen field is ignored for TEXT files with a field separator character defined.
This field indicates the external number of decimal places for the import field. If not specified, the Xdec field defaults to the specified TIBCO Object Service Broker decimal place (Dec field).
This field specifies the offset. The offset maps to the start of the external record in the import file. The origin is zero. Overlaps are allowed and you do not have to define fillers, since the offset can be used to skip undefined locations in the occurrence. You can specify offsets in one of three ways:
On the Open Systems platforms, the Offset field is ignored for TEXT files with a field separator character defined.
Specifying Internal TIBCO Object Service Broker Attributes
The following fields are used to specify the internal TIBCO Object Service Broker attributes. Use PF1 for valid values for each field. Use PF11 to view additional fields.
 
This field indicates whether the import fields are to be used in the primary key. You can select any field as the primary key using the P line command, without respect to uniqueness of data. You can select up to 16 contiguous fields for a composite primary key, to a maximum length of 127 bytes.
You must specify a primary key if you want to use the Table Browser or if you want to read multiple record types or repeating groups.
This field contains the TIBCO Object Service Broker semantic data type of the field. The default is null. You can specify any valid TIBCO Object Service Broker semantic data type and syntax combination supported for the external syntax. For valid combinations, refer to TIBCO Object Service Broker Programming in Rules.
This field contains the TIBCO Object Service Broker syntax of the field. You can specify any valid TIBCO Object Service Broker semantic data type and syntax combination supported for the external syntax. For valid combinations, refer to TIBCO Object Service Broker Programming in Rules. If a syntax is not specified, the Syn field defaults to an appropriate syntax based on the external syntax and length (Xsyn and Xlen fields). For more information on external syntax, refer to Appendix A, Mapping Data Types.
This field indicates the length of the import field. The data is padded or truncated as necessary. If a length is not specified, the Len field defaults to an appropriate length based on the external syntax and length (Xsyn and Xlen fields).
This field specifies the number of digits to appear to the right of the decimal point. The data is padded or truncated as necessary. If not specified, the Dec field defaults to the specified external number of decimal places (Xdec field).
Depending on the syntax specified in the Syn field, define this field as follows:
For syntax P, the number of decimal places must be smaller than twice the length of the entire field.
This field indicates the order (ascending or descending) in which the occurrences in this field are sorted. The default value of null returns occurrences in ascending order by primary key. When an ordering option is explicitly specified, it takes precedence over the default. When ordering is specified for more than one field, the sort precedence is determined by the order of the fields as they are listed in the table.
Specifying a value in this field incurs sorting overhead, which can be significant in tables with a large number of occurrences.
In Open Systems, if you have an import table with duplicate records and you want to sort, the sort results can be unpredictable since the internal sort does not maintain the input order of duplicate records. You must specify the ordering for each field to ensure you get the ordering you want.
This field displays the name of the global field if you used PF14 to select a field from the global field dictionary.
See Also
TIBCO Object Service Broker Shareable Tools for information on the ESTIMATETBLDFN tool.
TIBCO Object Service Broker Managing Data for information on global fields.
TIBCO Object Service Broker Parameters for more information about the CTABLESIZE Data Object Broker parameter.

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