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
 
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: 161
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: 445
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 Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am

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