Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us