473,396 Members | 1,655 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,396 software developers and data experts.

Multi-row insert timestamp error

I just recently tried to use a multi-row insert on a table that contains a
timestamp column, but I get SQLCODE -180 even though I'm positive that the
value that I'm trying to insert is correct. The error message is : " THE DATE,
TIME, OR TIMESTAMP VALUE *N IS INVALID". Any ideas?

Jun 27 '08 #1
4 4162
1) How did you make sure "the value that I'm trying to insert is
correct" ?

2) It would be better to show more practical concrete explanations.
For example:
- SQL statement to use your multi-row insert
- DDLs
- Whole(or comlete) error message
- Environments(Platform, DB2 version/release, so on)

3) I feel strange that message include "... *N ...".
What is "*N" ?
Jun 27 '08 #2
1) To do a multi-row insert, I declared an array with 10 occurrences in the
working storage of my Cobol program, and displayed the contents of the fields
in the array prior to doing the multi-row insert, so that's how I know the
timestamp is valid.
2) It would take too much room to show the actual SQL statement because I'm
working with very large tables with many columns. I use the mainframe
platform and DB2 version 8. The error message that I received is complete as
shown in my question.
3) the '*N' is a standard error message within DB2, so it is not really the
contents of the column, but a default error message that DB2 displays. It
doesn't mean much to me either which is why I hoped that I could get more
meaningful information from the GET DIAGNOSTICS statement.
Tonkuma wrote:
>1) How did you make sure "the value that I'm trying to insert is
correct" ?

2) It would be better to show more practical concrete explanations.
For example:
- SQL statement to use your multi-row insert
- DDLs
- Whole(or comlete) error message
- Environments(Platform, DB2 version/release, so on)

3) I feel strange that message include "... *N ...".
What is "*N" ?
Jun 27 '08 #3
"LouiseR" <u43744@uwewrote in message news:847f1893eac99@uwe...
1) To do a multi-row insert, I declared an array with 10 occurrences in
the
working storage of my Cobol program, and displayed the contents of the
fields
in the array prior to doing the multi-row insert, so that's how I know the
timestamp is valid.
Just to humor us, why don't you post the contents of your timestamp, and the
data type it is stored in, when you are inserting.
Jun 27 '08 #4
Mark A wrote:
>1) To do a multi-row insert, I declared an array with 10 occurrences in
the
working storage of my Cobol program, and displayed the contents of the
fields
in the array prior to doing the multi-row insert, so that's how I know the
timestamp is valid.

Just to humor us, why don't you post the contents of your timestamp, and the
data type it is stored in, when you are inserting.
I'll be happy to oblige. Below is the data area where I saved the timestamp
value, and which I used in the INSERT statement.
10 CQCMRACM-UPD-TMS PIC X(26) OCCURS 10.
And below is the result of the DISPLAY statement of this field just before
the INSERT:
CQCMRACM-UPD-TMS(1)=2008-05-20-15.25.13.792038
Here's the funny thing though. I asked a colleague's opinion about my issue,
and he made one small change in my code which resolved the issue. As you can
see above, I declared an array with 10 occurrences in Working Storage,
populated only 3 of those occurrences, and then did the INSERT specifying
"FOR 10 ROWS". The INSERT failed on the first row (according to GET
DIAGNOSTICS) with a -180 SQLCODE. My colleague suggested changing the "FOR 10
ROWS" to "FOR :WS-SUB ROWS", where WS-SUB contains the number 3 since that is
how many rows were populated in the working storage array. It worked! Thanks
for your interest!

--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums....m-db2/200805/1

Jun 27 '08 #5

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

Similar topics

37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
4
by: Frank Jona | last post by:
Intellisense with C# and a multi-file assembly is not working. With VB.NET it is working. Is there a fix availible? We're using VisualStudio 2003 Regards Frank
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
6
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on...
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
2
by: Aussie Rules | last post by:
Hi, I have a site that Iwant to either display my text in english or french, based on the users prefernces ? I am new to webforms, but I know in winforms, this is pretty easy with a resource...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.