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!

*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.

Jobs

clob insert/select in COBOL

clob insert/select in COBOL

(OP)
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 CLOB(:CLOB-VAR))
WEBSRV )
WEBSRV END-EXEC
WEBSRV

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!

Resources

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