Professional Web Applications Themes

LOAD question - IBM DB2

I am getting an error while loading data where numeric columns are suffixed with sign (eg, 500-, 2167+) in the input file. (using LOAD uitility). Any suggestions (without wrapping it with a shell script or C program to massage the data) ? Thanks...

  1. #1

    Default LOAD question

    I am getting an error while loading data where numeric columns are suffixed
    with sign (eg, 500-, 2167+)
    in the input file. (using LOAD uitility).
    Any suggestions (without wrapping it with a shell script or C program to
    massage the data) ?

    Thanks


    Murty Guest

  2. #2

    Default Re: LOAD question

    "Murty" <net> wrote in message
    news:LKjlb.326860$ops.asp.att.net... 
    suffixed 
    to 
    Can you tell us:

    1. DB2 release and fixpak level
    2. OS
    3. Exact load syntax used (if done with control center, you can save the
    generated script)
    4. Format of data in load file (delimited, fixed position, IXF, etc)
    5. Exact error message you are getting


    Mark Guest

  3. #3

    Default Re: LOAD question

    Ver : DB2 8.1 FP 2
    OS : Linux

    It is fixed position columns file and here is the LOAD command........

    LOAD FROM "/home/u01aps0/top10.txt" OF ASC MODIFIED BY
    DATEFORMAT="YYYYMMDD" TIMESTAMPFORMAT="YYYYMMDD"
    METHOD L(1 4, 9 16, 17 19, 20 25, 26 28, 29 31, 32 32, 33 35, 36 75, 76 91,
    92 106, 108 108, 109 123, 125 139)
    NULL INDICATORS(0,0,0,0,0,0,0,0,0,0,0,0,0,0)
    MESSAGES "/home/u01aps0/top10.msg"
    REPLACE INTO APS.X (FUND, POST_DATE, STTMT_CURRENCY, ACCOUNT, SUB_ACCOUNT,
    LOCAL_CURR, BASIS, BASE_CURR, DESCRIPTIONS, DR_BAL_MONTHEND,
    CR_BAL_MONTHEND, MEMO_IND, DR_BAL_EOD, CR_BAL_EOD)
    INDEXING MODE REBUILD;

    I am actually getting the following warning. It is loading the row with
    NULLS into the columns in question
    and that is not what I wanted....

    SQL3121W The field value in row "1" and column "76" cannot be converted to
    a
    FLOAT value. A null was loaded.

    "Mark A" <net> wrote in message
    news:sUjlb.1405$uswest.net... 
    > suffixed 
    > to 
    > Can you tell us:
    >
    > 1. DB2 release and fixpak level
    > 2. OS
    > 3. Exact load syntax used (if done with control center, you can save the
    > generated script)
    > 4. Format of data in load file (delimited, fixed position, IXF, etc)
    > 5. Exact error message you are getting
    >
    >[/ref]


    Murty Guest

  4. #4

    Default Re: LOAD question

    > > > I am getting an error while loading data where numeric columns are [/ref][/ref]
    program [/ref][/ref]

    "Murty" <net> wrote in message
    news:Banlb.838252$.. 
    91, 
    to 
    Looking at the manual, it appear that it doesn't like the leading blanks
    and/or the trailing sign (not sure which). I didn't see any parms that can
    be set to allow it, but I am not an expert in this.

    You might try a test file of a few records to find out which values it will
    accept and if the problem is the leading blanks or trailing sign (or both).
    If there is a problem with the "+" then you can replace it with a decimal.


    Mark Guest

Similar Threads

  1. Load Data Infile question
    By bradfordh@gmail.com in forum MySQL
    Replies: 3
    Last Post: March 23rd, 04:53 AM
  2. About flash is load xml question
    By tiange in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: March 2nd, 05:39 PM
  3. xml.load() question..
    By Chizl in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 18th, 09:53 PM
  4. load movie question
    By FlashMX webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 5th, 10:19 AM
  5. Body-on load in template question
    By Murray *TMM* in forum Macromedia Dreamweaver
    Replies: 7
    Last Post: July 9th, 11:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139