I am having trouble inserting or retrieving data into a clob when the data is larger than 32765. Precompiler errors as unusable .
Even when I insert a smaller text into the clob, only 1000 bytes makes it in even though the text is longer.
I am using COBOL, DB2 V9.1 on z/OS
Urgent timeframe so any help would be greatly appreciated.
WS_REQUEST is what I am attempting to write to the clob.
01 WS-REQUEST PIC X(100000) VALUE SPACES.
01 WS-RESPONSE PIC X(500000) VALUE SPACES.
WEBSRV 01 WS-LENGTH PIC S9(4) COMP VALUE ZERO.
WEBSRV 01 WS-LENGTH-DISP PIC 9(4) VALUE ZERO.
WEBSRV
websrv 01 CLOB-VAR USAGE IS SQL TYPE IS CLOB(500000).
websrv 01 FILLER REDEFINES CLOB-VAR.
websrv 05 JUNK PIC X(4).
websrv 05 CLOB-VAR-2 USAGE IS SQL TYPE IS CLOB(500000).
websrv
...................................
WEBSRV WRITE-CLOB.
WEBSRV MOVE WS-REQUEST TO CLOB-VAR
WEBSRV EXEC SQL
WEBSRV SELECT BATCH_MSG_SEQ_NMBR INTO :WS-SEQUENCE
WEBSRV FROM FINAL TABLE
WEBSRV (
WEBSRV INSERT INTO TEAW036 (
WEBSRV BATCH_MSG_SEQ_NMBR, CRT_DTTM, MSG_TEXT)
WEBSRV VALUES(
WEBSRV NEXT VALUE FOR BATCH_MSG_SEQ,
WEBSRV CURRENT TIMESTAMP,
WEBSRV CLOBCLOB-VAR))
WEBSRV )
WEBSRV END-EXEC
WEBSRV
Even when I insert a smaller text into the clob, only 1000 bytes makes it in even though the text is longer.
I am using COBOL, DB2 V9.1 on z/OS
Urgent timeframe so any help would be greatly appreciated.
WS_REQUEST is what I am attempting to write to the clob.
01 WS-REQUEST PIC X(100000) VALUE SPACES.
01 WS-RESPONSE PIC X(500000) VALUE SPACES.
WEBSRV 01 WS-LENGTH PIC S9(4) COMP VALUE ZERO.
WEBSRV 01 WS-LENGTH-DISP PIC 9(4) VALUE ZERO.
WEBSRV
websrv 01 CLOB-VAR USAGE IS SQL TYPE IS CLOB(500000).
websrv 01 FILLER REDEFINES CLOB-VAR.
websrv 05 JUNK PIC X(4).
websrv 05 CLOB-VAR-2 USAGE IS SQL TYPE IS CLOB(500000).
websrv
...................................
WEBSRV WRITE-CLOB.
WEBSRV MOVE WS-REQUEST TO CLOB-VAR
WEBSRV EXEC SQL
WEBSRV SELECT BATCH_MSG_SEQ_NMBR INTO :WS-SEQUENCE
WEBSRV FROM FINAL TABLE
WEBSRV (
WEBSRV INSERT INTO TEAW036 (
WEBSRV BATCH_MSG_SEQ_NMBR, CRT_DTTM, MSG_TEXT)
WEBSRV VALUES(
WEBSRV NEXT VALUE FOR BATCH_MSG_SEQ,
WEBSRV CURRENT TIMESTAMP,
WEBSRV CLOBCLOB-VAR))
WEBSRV )
WEBSRV END-EXEC
WEBSRV