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 Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm

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