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