View previous topic :: View next topic |
Author |
Message |
rkinfy Beginner
Joined: 12 Nov 2010 Posts: 11 Topics: 3
|
Posted: Mon Nov 22, 2010 5:02 am Post subject: Unload CLOB in readable format |
|
|
I'm trying to unload CLOB data from a table to file using DB2 utility. But the data is not in readable format. Is there a way to get the data in readable format? _________________ RK. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Nov 22, 2010 6:43 am Post subject: |
|
|
what do you mean 'readable format'?
CLOB data is normally 'as is'.
what is contained in your CLOB? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
rkinfy Beginner
Joined: 12 Nov 2010 Posts: 11 Topics: 3
|
Posted: Tue Nov 23, 2010 1:25 am Post subject: |
|
|
Hi Dick,
Here's what I got using the IBM Utility.
Data in the table (Extracted using a normal query)
********************************* Top of Data **********************************
EducationalData xmlns:ps="http://www.ibm.com/mdm/metadata/spec/EducationalData/i
Data in the unloaded file _________________ RK. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Nov 23, 2010 3:49 am Post subject: |
|
|
what is the CSID of the CLOB.
it appears that you have ANSCII data stored in your CLOB column,
your 'normal query' takes into account the CCSID of the data,
your unload does not. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
rkinfy Beginner
Joined: 12 Nov 2010 Posts: 11 Topics: 3
|
Posted: Tue Nov 23, 2010 6:55 am Post subject: |
|
|
Thanks for the input Dick.
I changed the job to include EBCDIC CCSID(00037,00037,01200) parameter. I'm getting the data in the readable format.
But each row in the table is coming as a separate member in a PDS. Is there any way to get the data in a PS file? _________________ RK. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Tue Nov 23, 2010 11:23 am Post subject: |
|
|
rkinfy wrote: | But each row in the table is coming as a separate member in a PDS. Is there any way to get the data in a PS file? |
rkinfy,
What DB2 Unload utility are you using to unload the data? Post the JCL
Kolusu |
|
Back to top |
|
 |
rkinfy Beginner
Joined: 12 Nov 2010 Posts: 11 Topics: 3
|
Posted: Wed Nov 24, 2010 2:54 am Post subject: |
|
|
Hi Kolusu,
Please find below the JCL used.
Code: |
//XXXXXXXB JOB (XXXX),'CLOB UNLOAD',NOTIFY=&SYSUID,CLASS=0,MSGCLASS=X
//*
// SET Q1=XXXX,Q2=UNL00038
// SET DB2SS=XXXX
//*
//BR14 EXEC PGM=IEFBR14
//FILE01 DD DSN=&Q1..SIEBEL.&Q2..UNLOAD,
// DISP=(MOD,DELETE,DELETE),SPACE=(CYL,5)
//*
//UNLCLB EXEC PGM=DSNUTILB,PARM=('&DB2SS','&Q2'),
// REGION=0M
//STEPLIB DD DISP=SHR,DSN=XXXX.DB2.DSNLOAD
//ABNLIGNR DD DUMMY
//DSSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//RNPRIN01 DD SYSOUT=*
//STPRIN01 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
TEMPLATE LOBFRV DSN 'XXXX.CLOBUNLD.TEST'
UNIT(SYSDA)
UNLOAD DATA
FROM TABLE XXXXX.CONTACTDEMOGRAPHICS
(CONT_ID, VALUE VARCHAR(2000) CLOBF LOBFRV)
SHRLEVEL CHANGE
NOPAD EBCDIC CCSID(00037,00037,01200)
/*
//SYSREC DD DSN=&Q1..SIEBEL.&Q2..UNLOAD,
// DISP=(NEW,CATLG,CATLG),
// SPACE=(CYL,(10,30),RLSE),
// UNIT=SYSDA
//SYSPUNCH DD DUMMY
//* |
_________________ RK. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
rkinfy Beginner
Joined: 12 Nov 2010 Posts: 11 Topics: 3
|
Posted: Thu Nov 25, 2010 4:11 am Post subject: |
|
|
Thanks Kolusu. I removed the TEMPLATE and LOBFRV parameters. It is giving the data in a readable format now.
Code: |
UNLOAD DATA
FROM TABLE XXXXX.CONTACTDEMOGRAPHICS
(CONT_ID, VALUE VARCHAR(2000) CLOB )
SHRLEVEL CHANGE
NOPAD EBCDIC CCSID(00037,00037,01200)
|
Thanks again!! _________________ RK. |
|
Back to top |
|
 |
|
|