Fields are the only compulsory definitions in an import
specification.
There are two different types of fields.
-
IBM® Controller fields
- Temporary fields
Controller fields are fixed and
correspond to
Controller’s database
identities. Each type of structure specification has different mandatory fields that must be defined
before the import structure specification can be saved as a valid import structure specification.
Fields are used to store values in the
Controller database and the format is
therefore pre-defined. The fields can be alphanumeric or numeric. Temporary fields are used to carry
out various calculations or operations in multiple steps.
Before you begin
It is necessary to define the format and width of temporary
fields manually. Otherwise the format and width of a temporary field
is set automatically as Alpha format with a width of 1.
For both types of field you can define the source of the field’s
initial value and the required operation, if the initial value has
to be processed before being stored.
For temporary fields you can define the field’s format, length
and number of decimal places. The identity of a temporary field
must begin with the @ character and must be followed by the following
character types only: _, 0-9, A-Z.
By clicking the check button you check the
settings you have defined in the import specification. Any errors
are shown in a separate window.
Procedure
-
On the Transfer menu, click External
Structure/Define Import Structure Specification.
The Define Import Structure Specifications window
opens.
-
In the Specification list box, select
the specification you want to change, or click the New button
and enter a new name and press Enter.
-
On the Fields (1) tab, click the New
Temporary field button to create a new temporary field.
In the dialog box that opens, enter the name of the new field and
click OK. The new field starting with "@" is
displayed in the list box.
-
In the list box, select the field you want to define and
enter a full name or description in the Description text
box.
-
From the Format option group, select
the field format.
-
Specify the field length and also the number of decimals
if the field is numeric.
-
From the Origin option group, select
an option from where the initial field information should be retrieved:
The origin is the source of the initial value of the field/temporary
field.
-
None - no information
-
File - retrieves the value from the file,
either from a specific field (item) or from a specific position
(substring). Enter the relative row number. If there is one row
per transaction in the import file, the relative row is 0.
-
Variable - retrieves the value from a variable.
Enter the variable name in the text box.
-
Temporary Field - retrieves the value from
a temporary field. Enter the field name.
-
From the Operation option group, select
the operation to use for refining the information.
None - no operation
Item - refers to an item field in the file.
Enter the item number and the separator.
Substring - refers to a specific position
in the file. Enter the From position and the length.
Operation Template - refers to an operation
template. Select the relevant operation template.
-
Select the Use last non-empty value option
if the specified field is repeated on each row in the import file,
but only the first row contains the actual data. Example: The date
is shown in the first field on the first row in the file. The same
field is empty on the remaining rows. The system will remember the
value in the first field on the row and use it on all rows for which
the same field is blank.
-
Click Save.