473,287 Members | 1,643 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,287 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 4157
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.