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 insert picture(JPG) into z/os DB2 table ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Feb 24, 2009 7:22 pm    Post subject: How insert picture(JPG) into z/os DB2 table ?
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.
http://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

Site Director


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

PostPosted: Tue Feb 24, 2009 11:04 pm    Post subject:
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: 1504
Location: Chennai

PostPosted: Tue Mar 03, 2009 1:55 pm    Post subject:
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: 1013
Location: India

PostPosted: Tue Mar 03, 2009 2:16 pm    Post subject:
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    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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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