Importing comma-separated fields  Exporting text files

Chapter 2: Using TRAN-IDE

Building field objects using Custom Import

The Custom Import Feature gives you the ability to build field objects from an external file when you know the format of the file.

  1. Select File | Import | Custom Import. The Custom Import Criteria window opens where you define the format of a series of records in the external file, where each record identifies the characteristics of a single field.

  2. Complete the fields in the window with the values that correspond to the data for the field object definitions. See

  3. Click one of these options:


Entering values in the Custom Import Criteria fields

The Start column value is the column position in the data file for that entry. The Length column value is the number of columns in the data file for that entry. Column positions for each record in the file start at “1.” Use a value of zero (0) to tell TRAN-IDE to use the default value for a particular field.

Example

This example shows content from a metadata file that describes field objects, which allows TRAN-IDE to build production object fields automatically.

NoteThis functionality applies only to stream fields (not tree fields).

12345678910111213141516171819202122232425262728

@    part1             0       12        nN9
@    part26            12      8         nN9
@    part305           20      15        nN9

Each line of the file (except the first line), represents data describing one field object. When you enter values in the Custom Import Criteria window, you instruct TRAN-IDE where in the line to find the data needed to build the field object. The example entries are shown in Figure 2-4.

Figure 2-4: Custom Import example input

NoteRemember that the values shown in the metadata file are not the values you enter in the Custom Import Criteria fields. The file values describe the actual content for the field object. The values you enter describe where the data begins and the data’s length, so TRAN-IDE knows what data to extract to create the production object fields.

NoteEach column should be 1 character only, although the example displays 2 digit numbers in the first line for simplification.





Copyright © 2005. Sybase Inc. All rights reserved. Exporting text files

View this book as PDF