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
 

 

Import bulk PDF or TXT files into BLOB column of a table

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

Active User


Joined: 10 Aug 2009
Posts: 158
Location: India

PostPosted: Tue Sep 15, 2015 4:51 pm    Post subject: Import bulk PDF or TXT files into BLOB column of a table
Reply with quote

Hi,

We are working on an document oriented application migration. We wonder if it is possible to import bulk PDF and TXT files into a BLOB column of a table in DB2 9.7 database.

Below is the table definition:

CREATE TABLE AXP_DOC_DATA (
ID CHAR(32) NOT NULL,
FILE_NAME VARCHAR(255) NOT NULL,
FILE_EXTN VARCHAR(10) NOT NULL,
FILE_DATA BLOB(10M),
PRIMARY KEY (ID));

I want to load following list of PDF and TXT files into above table. Could you please let me know how can we load these files?

File1.pdf
File2.pdf
File3.txt
File4.pdf
File5.txt

Thanks a lot.
Regards
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Sep 16, 2015 8:13 pm    Post subject:
Reply with quote

Mentioning 9.7 makes me think you are using DB2 LUW.
Check out the load statement,
especially "Example 2 (Loading LOBs from Files)"

https://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008305.html?cp=SSEPGG_9.7.0%2F3-6-2-4-78
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Fri Sep 18, 2015 8:10 pm    Post subject:
Reply with quote

I'm not a DBA but I seem to recall the BLOB (and CLOB) loads having to be done from PDSE members in a project I was involved with. So the PDF's may have to be copied to PDSE members and loaded from there.

If you have a very large number to load into the PDSE remember that PDSE's are single volume so limited by the size of available volumes you have.
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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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