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

How insert picture(JPG) into z/os DB2 table ?


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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Feb 24, 2009 7:22 pm
Reply with quote

Hello,

I want to know, how to insert a picture into a DB2 Table.

My table structure will be like this
Code:
   ID      VARCHAR(10),
   NAME       VARCHAR(10),
   Description    VARCHAR(255),
   IMAGE       CLOB(2 M)


The picture, that i want to insert is in desktop - currently.
1. Say i will upload the picture into mainframe in binary format.
Question: Uploading the picture in binary format is correct or wrong ?

2. HOW to INSERT the picture into the DB2 TABLE ?

I am clueless about this..........

I refered to this post, But I'm not using any programs for insertion. Just plain INSERT STATEMENT.
ibmmainframes.com/viewtopic.php?t=36854&highlight=insert+lob

Thank You,
Sushanth Bobby
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Feb 24, 2009 11:04 pm
Reply with quote

Hello,

Suggest you use a program for these inserts. . .
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Mar 03, 2009 1:55 pm
Reply with quote

Quote:
1. Say i will upload the picture into mainframe in binary format.
Question: Uploading the picture in binary format is correct or wrong ?



I was trying to send pictures via SMTP and came across this scenario.

Transferring to mainframes using binary format is the correct way.
If you want to verify, then u can re-tranfer the picture back from mainframes to PC and open the file. It would be proper.
It once tried with PS file with recfm = fb and rec length = 80 and it worked fine. icon_biggrin.gif
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Mar 03, 2009 2:16 pm
Reply with quote

Yes & Thank You Vasanth.
Since that happen to be the only way to send picture into mainframe.

Sushanth
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top