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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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