Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COBOL DB2 CLOB Update - CLOB-LOCATOR

Status
Not open for further replies.

twhusky

Programmer
Nov 12, 2009
1
US
thread209-1437614
Using DB2 V9R1 I'm trying to Update CLOB COLUMN with a COBOL program and getting the following error:

DSNT408I SQLCODE = -423, ERROR: INVALID VALUE FOR LOCATOR IN POSITION 2

Here is the COBOL WS & Procedure Div Code:
DB2 CLOB DCLGEN:
EXEC SQL DECLARE WGH.RPT_GEN_PRCS_OUT TABLE
( RPT_GEN_OUT_ID INTEGER NOT NULL,
LST_UPDT_TS TIMESTAMP NOT NULL,
LST_UPDT_USR_ID CHAR(8) NOT NULL,
RPT_DATA CLOB(1048576)
) END-EXEC.
***********************************************************
COBOL DECLARATION FOR TABLE WGH.RPT_GEN_PRCS_OUT
***********************************************************
01 DCLRPT-GEN-PRCS-OUT.
RPT_GEN_OUT_ID
10 RPO-RPT-GEN-OUT-ID PIC S9(9) USAGE COMP.
LST_UPDT_TS
10 RPO-LST-UPDT-TS PIC X(26).
LST_UPDT_USR_ID
10 RPO-LST-UPDT-USR-ID PIC X(8).
RPT_DATA
10 RPO-RPT-DATA USAGE SQL TYPE IS CLOB-LOCATOR.

Procedure Div:
MOVE WS-CLOB-TABLE TO RPO-RPT-DATA
MOVE 8 TO WS-RPT-OUT-TABLE-ID.

EXEC SQL
UPDATE WGH.RPT_GEN_PRCS_OUT
SET LST_UPDT_TS = CURRENT_TIMESTAMP
,LST_UPDT_USR_ID = 'WGHRXCLB'
,RPT_DATA = :RPO-RPT-DATA
WHERE RPT_GEN_OUT_ID = :WS-RPT-OUT-TABLE-ID
END-EXEC.

Hopefully Marclodge sees this. I read where he has had some success with COBOL CLOB's in the past.

Thanks.

 
Hi twhusky,
Sorry, only just seen this.

Did you resolve this in the end?

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top