Skip to main content

Problem:

The content of a DB2 table has been extracted in a report type representation. The column data are available in a displayable format. SQLWizard can be used to Import the data as ASCII fixed width. Some conditions must be obeyed to enable Import to read and accept the data.

Resolution:

Remove Heading lines and trailing summary lines from the data file.  In SQLWizard Import the sequence of the steps is important:

  - first select the Format ASCII Fixed Width

  - adjust the spaces (1 or 2) and disable the Heading

  - select the input file, which may have extension .txt or .fix

  - then specify the table to be loaded

Now all DECIMAL data are supposed to be represented in the format as specified in the SQL Client Option Format tab.  Which means that all decimals are expected in the same length.

If your decimal column values are  provided in different formats, you have to evaluate the table definition. Click on Recalculate in the Import menu item to achieve this.  Then for DECIMAL(n,m), an external display of n m characters all inclusive is assumed. However DECIMAL(n,0) numbers must occupy n 1 positions.

If you enable Heading, then every DECIMAL column will be expected of type Integer, and no fractions are accepted.

If your numbers contain comma as decimal point, you need to append this in your SQL Client Options as  ...zz9.99 .=',' ,='.'

Old KB# 6665

#MFDS
#EnterpriseDeveloper