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!

BLOBS and CLOBS. Information required

Status
Not open for further replies.

MarcLodge

Programmer
Feb 26, 2002
1,886
GB
Anybody know anything about CLOBs (Character large objects) and BLOBs (Binary
large objects) in DB2 V7 R1? I've tried Google, and a couple of other search
engines, plus looked in manuals

My DCLGEN looks like

DB2 table column names
EXEC SQL DECLARE TAOOITEM TABLE
( ITEMID CHAR(40) NOT NULL,
VALUE CHAR(200),
TYPEID CHAR(40),
OWNERID CHAR(40),
STATUSID CHAR(40),
CREATETSD TIMESTAMP,
UPDATETSD TIMESTAMP,
ITEM_ROWID ROWID NOT NULL,
VALUECL CLOB(131072),
VALUEBL BLOB(1048576)
) END-EXEC.

Cobol vars
01 DCLTAOOITEM.
10 ITEMID PIC X(40).
10 VALUEID PIC X(200).
10 TYPEID PIC X(40).
10 OWNERID PIC X(40).
10 STATUSID PIC X(40).
10 CREATETSD PIC X(26).
10 UPDATETSD PIC X(26).
10 ITEM-ROWID USAGE SQL TYPE IS ROWID.
10 VALUECL USAGE SQL TYPE IS CLOB-LOCATOR.
10 VALUEBL USAGE SQL TYPE IS BLOB-LOCATOR.

Null Inds
01 INDTAOOITEM.
10 VALUEID-IND PIC S9(4) COMP.
10 TYPEID-IND PIC S9(4) COMP.
10 OWNERID-IND PIC S9(4) COMP.
10 STATUSID-IND PIC S9(4) COMP.
10 CREATETSD-IND PIC S9(4) COMP.
10 UPDATETSD-IND PIC S9(4) COMP.
10 VALUECL-IND PIC S9(4) COMP.
10 VALUEBL-IND PIC S9(4) COMP.

I have 2 Auxiliary data types of TAOOITEMBLOB and TAOOITEMCLOB each containing
columns
AUXID
AUXVER
AUXVALUE

My understanding is that the ITEM-ROWID is automatically generated, probably
also values on TAOOITEMBLOB and TAOOITEMCLOB. But how do I insert/update
VALUECL, and VALUEBL?

All help gratefully received.
Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top