Define Columns In A Fixed-Field Text Data Source - IBM Cognos User Manual

Version 10.1.1
Table of Contents

Advertisement

3. If required, specify the turn-of-the-century break-point (CenturyBreak setting).
4. Specify whether the measure values associated with these dates apply to some
or all levels in the time dimension.

Define Columns in a Fixed-field Text Data Source

When your data source is a fixed-field text file, you must define the columns using
the Column property sheet. Otherwise, Cognos Transformer does not have the
necessary information about how columns in the source file are defined and cannot
accurately populate your model.
Because this is a manual process, you can define overlapping columns or define a
column that includes other columns.
With fixed-field text sources, you cannot use the Modify Columns command on
the Tools menu to remap model columns when the structure of the source file
changes. Instead, you must manually modify the starting byte and width of each
column on its property sheet.
Procedure
1. Use the New Data Source wizard to add a fixed-field text data source.
2. From the Edit menu, click Insert Column.
3. In the Column name box, type a name for the new column.
4. On the General tab, in the Data class box, select the appropriate data type.
5. In the Position box, type the starting position of the column in a record.
The first byte in a record is byte number 1.
6. In the Size box, type the width of the column in bytes.
7. Set other properties for the column as required and click OK.
8. Repeat steps 2 to 7 for each column in the source file.
Example - Defining Fixed-field Columns
You want to define columns for a fixed-field source file in which each record is 38
bytes long and encompasses five data fields.
Procedure
You specify in the New Data Source wizard that the first field is an 8-byte numeric
field giving the date of a transaction. The next 14-byte field indicates the product
type. Note that the type Product1 uses fewer than the 14 bytes available in the
field. An 8-byte field indicates the color of each item sold. The last 8 bytes store
monetary values for the measure fields Cost (4 bytes) and Revenue (4 bytes).
Results
Cognos Transformer can now correctly interpret the columns. For example, the first
record represents a transaction that generated 330 in revenue, occurring on January
3, 2007, involving Product1, Color1, that cost 214 to produce.
Example
Column 1
12345678
Column 2
Column 3
90123456789012
34567890
Column 4
12345678
Chapter 3. Data Sources for Your Model
49

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents