IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

UNLOAD/LOAD DB2 table with XML data type


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Thu Aug 14, 2014 4:45 am
Reply with quote

Hi all

I am using BMC Utility to load and unload data to DB2 tables.I am facing exactly the same error mentioned in the below post.

ibmmainframes.com/viewtopic.php?t=53123&highlight=xml

There was a response that the feature is not supported by BMC UNLOAD back in 2011. Is it still not supported by BMC?

Here is the DDL for the table.

Code:

CREATE TABLE  USER1.TABLE1
(
 COLUMN1  CHAR(19) NOT NULL                         
,COLUMN2  CHAR(6) NOT NULL                   
,COLUMN3  CHAR(1) NOT NULL WITH DEFAULT         
,COLUMN4  XML                                   
,COLUMN5  CHAR(8) NOT NULL WITH DEFAULT     
,COLUMN6  CHAR(2) NOT NULL WITH DEFAULT     
)
 IN DATABASE.TABLESPACE
  CCSID EBCDIC
  NOT VOLATILE
  APPEND NO;                               
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Aug 14, 2014 5:27 am
Reply with quote

And what does it say in the manual for your -- licensed, of course -- version of BMC Unload Plus?
Back to top
View user's profile Send private message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Thu Aug 14, 2014 5:40 am
Reply with quote

I could not find any direction on the unload of XML columns in the manual.

The Mainframe has UNLOAD PLUS(R) for DB2* Reference Manual V 4.1. I am not sure if this is the latest version.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 02, 2014 12:35 pm
Reply with quote

Hi Majid,

What version of BMC Utilities are you using ?

I am using BMC V10R1.00,

My Table Details are,
Code:
Column Name       ColNo Datatyp Length 
---1----v----2----v----3----v----4----v-
EMPNO                 1 CHAR         6 
EMP_XML               2 XML          6 
DB2_GENE.._FOR_XML    3 BIGINT       8 
************************  BOTTOM OF DATA


Below is a sample unload card,

TESTED
Code:
UNLOAD SHRLEVEL CHANGE                                     
FIXEDVARCHAR YES                                           
DIRECT NO                                                   
UNICODE                                                     
CNTLCARDS DB2LOAD                                           
                                                           
OUTPUT XML01 DSNAME('TEST.BOBBY.XML.TEST')                 
       DSNTYPE LIBRARY UNIT(DASD) SPACE(500, 100) SUBSETS 1
       UNIT SYSDA                                           
                                                           
      SELECT     EMPNO                                     
                ,EMP_XML                                   
          INTO                                             
                EMPID                                       
               ,EMP_XML CHAR (45) CLOBF XML01               
         FROM BOBBY.EMPLOYEE_XML                         
         ;                                                 

Load card will be sort of like this,
Code:
LOAD DATA INDDN SYSREC                 
     UNICODE CCSID(367,1208,1200)       
  INTO TABLE                           
BOBBY.£TABLE1                         
(EMPID POSITION(1:18) CHAR  MIXED(18)   
,EMP_XML POSITION(19:63) CHAR(45) CLOBF
      PRESERVE WHITESPACE               
      NULLIF BMC_NULL1=X'3F'           
    ,     BMC_NULL1 POSITION(64) CHAR(1)
)                                       

Thanks,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top