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: 168
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: 470
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 General Query on DB2 table design subratarec DB2 3 Thu Feb 14, 2019 12:49 pm
No new posts Storing SORTOF files in a PDS ajithajt SYNCSORT 3 Thu Dec 06, 2018 12:27 pm
No new posts What is a table space in db2 for z/os? martin schlatter DB2 13 Sat Nov 24, 2018 11:19 pm
No new posts Modify the value of a extensionvariab... UmeySan CLIST & REXX 29 Wed Nov 14, 2018 11:48 pm
No new posts Anyone know how to copy Unix files? John Poulakos JCL & VSAM 7 Wed Oct 10, 2018 12:57 am

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