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: 1278
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: 437
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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