473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Nov 12 '05 #1
3 4453
"Murty" <ad***@comcast.net> wrote in message
news:LK********************@rwcrnsc51.ops.asp.att. net...
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

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
Nov 12 '05 #2
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" <ma@switchboard.net> wrote in message
news:sU******************@news.uswest.net...
"Murty" <ad***@comcast.net> wrote in message
news:LK********************@rwcrnsc51.ops.asp.att. net...
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

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

Nov 12 '05 #3
> > > 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" <ad***@comcast.net> wrote in message
news:Banlb.838252$YN5.946392@sccrnsc01... 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.

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.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Max | last post by:
Frankly, i need session variables to persist regardless of load balancing. My hoster says save them in files, yuk. Are there any other thoughts The problem is that the session variables are lost...
6
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start...
1
by: paul-esposito | last post by:
Okay, so I'm the DBA not a developer, but I need a sanity check. All the data access to the database is controlled by Stored Procedures, the procedures are really granular, basically every table...
2
by: Lee Alexander | last post by:
Why does Assembly.Load allow this: Assembly.Load( "mscorlib" ); if you try the following it fails as expected: Assembly.Load( "System" ); Since it should be (for framework 1.1):...
7
by: Dan Nash | last post by:
Hi guys Ok, i have an aspx with a user control. In the user controls pageload i set a property (mystring = "test";). i then want to access that from the page_load of the aspx thats using the...
1
by: Jerry LeVan | last post by:
At the time I built Postgresql 7.4.2 I did not have aqua Tcl/Tk installed. The Aqua Tcl/Tk version installs in a different location the the apple supplied Tcl ( apple does not supply Tk). I...
7
by: P. Adhia | last post by:
Sorry for quoting an old post and probably I am reading out of context so my concern is unfounded. But I would appreciate if I can get someone or Serge to confirm. Also unlike the question asked in...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
1
by: charlie imac | last post by:
I have a question on the capability of Ajax. My question is: Is it possible to dynamically load any of the javascript gallery programs such as: Adobe Spry Gallery SmoothGallery others I...
5
by: BerlinBrown | last post by:
Do you know if it is possible to wait for the iframe page to load and then manipulate the iframe DOM. E.g. mypage: <script> function myinit() { theiframe.location = "iframe_with_frames.html"...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.