I have a problem writing to a temporary table. Here are some additional indications
- Z / OS
- COBOL program.
- DB2 V7
Here is my code
creating the temporary table
Code:
EXEC SQL
CREATE GLOBAL TEMPORARY TABLE SESSION.TEMPCOCS
( DATA1 CHAR(12) NOT NULL,
DATA2 CHAR(4) NOT NULL,
DATA3 CHAR(45) NOT NULL,
)
END-EXEC.
I integrate the data into the table:
Code:
EXEC SQL
INSERT INTO SESSION.TEMPCOCS
(DATA1
,DATA2
,DATA3
)
VALUES (:WS-DATA1
,:WS-DATA2
,:WS-DATA3
)
END-EXEC.
the displays shows that we move 22 times in the INSERT table
at the end I expect the data in this table:
Code:
EXEC SQL
SELECT COUNT(*) INTO :WS-COMPT FROM SESSION.TEMPCOCS
END-EXEC.
but the result is zero.
I tried to add like but nothing changes. I'm always in the same session when I did the select count.
Bookmarks