Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How can i insert a value into a BLOB field?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How can i insert a value into a BLOB field?
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    Post subject: Re: How can i insert a value into a BLOB field?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Ccompar BLOB (images of type jpg) on ... nihad DB2 0 Sun Feb 05, 2017 3:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us