IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can i insert a value into a BLOB field?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Roshan_kr

New User


Joined: 13 Mar 2005
Posts: 2
Location: India

PostPosted: Tue Jan 31, 2006 11:40 am
Reply with quote

How can i insert a value into a BLOB field.
Back to top
View user's profile Send private message
MichaelKBS

New User


Joined: 10 Jan 2006
Posts: 24
Location: Germany

PostPosted: Tue Jan 31, 2006 3:49 pm
Reply with quote

Hi,

you have to define a corresponding hostvariable first.

For example:

** COBOL-DECLARATION
** *******************
**
01 DCL-TABLE.
05 DCL-BLOB-COLUMN USAGE SQL TYPE
IS BLOB (8K).

**
** DECLARE-Statement
** ******************
EXEC SQL DECLARE tablename TABLE
(
BLOBCOLUMN BLOB
)
END-EXEC.


**
** INSERT
** ******
EXEC SQL
INSERT INTO tablename
(
BLOBCOLUMN
)
VALUES
(
:DCL-BLOB-COLUMN
)
END-EXEC.


regards,
Michael
Back to top
View user's profile Send private message
senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Wed Feb 15, 2006 9:35 pm
Reply with quote

Hi MichaelKBS,


i want to know some points reg insert the value for blob column



Actually i followed the steps which are mentioned by you .
i declared working storage variable , table declaration in cobol- db2 pgm. How the progrm will know the image file for blob column?
where should i mention the image file which is going to be inserted into the value for blob column in the cobol program?


Please help me in that issue

Thanks in advance



Regards ,
Senthil
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Storing a BLOB/CLOB in PL/I PL/I & Assembler 4
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top