×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

COBOL DB2 CLOB Update - CLOB-LOCATOR

COBOL DB2 CLOB Update - CLOB-LOCATOR

COBOL DB2 CLOB Update - CLOB-LOCATOR

(OP)
thread209-1437614: Insert of a CLOB in Cobol
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.

 

RE: COBOL DB2 CLOB Update - CLOB-LOCATOR

Hi twhusky,
Sorry, only just seen this.

Did you resolve this in the end?

Marc

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close