MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 UNLOAD Utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Thu Sep 24, 2009 3:18 pm    Post subject: DB2 UNLOAD Utility Reply with quote

Hi all,

I am trying to UNLOAD the data from a table.
But I am getting the data in unreadable format.
Could anyone please help me how to unload the data in a readable format?
Thanks in Advacne.

Reference:
Code:

 //DSNUPROC.SYSIN DD *                                     
 UNLOAD TABLESPACE DSN00004.TBLBUSCO                       
 UNICODE                                                   
 NOSUBS                                                   
 SHRLEVEL CHANGE                                           
 ISOLATION CS                                             
     FROM TABLE   TBLBUSCONTACT_TEST_BCN       
     WHEN (BCN_ID = 11387)                                 
 //                                                       
 **************************** Bottom of Data **************

Output in SYSREC:
[code:1:294e64e2f1]
********************************* Top of Data ******************
.....#.
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Sep 24, 2009 3:51 pm    Post subject: Reply with quote

satyenderd,

Run DSNTEP2 which automatically expand all the columns to readable format. But the only problem with this is the LRECL is limited to 133 bytes. so the output will will span multiple lines

check this link for an examples

http://www.mvsforums.com/helpboards/viewtopic.php?p=50679#50679

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Thu Sep 24, 2009 4:27 pm    Post subject: Reply with quote

Thanks a lot Kolusu.

I tried that
Code:


***************************** Top of Data ******************************
//SMUR540B JOB (540-0-2853-28),'DB2 SUPPORT',CLASS=C,MSGCLASS=T,       
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID,USER=SMUR540               
//*SMUR540A JOB (ACCOUNT),'NAME'                                       
//*                                                                     
//*                                                                     
//JOBLIB    DD DISP=SHR,DSN=SOFTP155.DB2.V91.N6Q1.SDSNLOAD             
//PROCLIB JCLLIB ORDER=SOFTP155.DB2.V91.N6Q1.PROCLIB                   
//STEP0100 EXEC PGM=IKJEFT01                                           
//SYSTSIN   DD *                                                       
 DSN SYSTEM(N6Q1)                                                       
 RUN  PROGRAM(DSNTEP2) -                                               
      PLAN(DSNTEP2)    -                                               
      LIB('SOFTP155.DB2.V91.N6Q1.SDSNLOAD')                             
 END                                                                   
//SYSTSPRT  DD SYSOUT=*                                                 
//SYSPRINT  DD DSN=SMUR540.SPUFI.OUTPUT.NEW,DISP=(NEW,CATLG,DELETE),   
//             UNIT=SYSDA,SPACE=(CYL,(20,20),RLSE)                     
//SYSIN     DD *                                                       
  SELECT * FROM "$ETL540"."TBLBUSCONTACT_TEST_BCN"                     
                      WHERE BCN_ID = 11387;                             
/*                                                                     
**************************** Bottom of Data ****************************

I encounter the follwing error:
Code:

     JCP0800W DIS STD: IT IS SUGGESTED THAT THE JOB NAME END WITH YOUR
              AGENCY NUMBER -- (J)1                                   
JCPA JCP0530W BLKSIZE MAY BE REQUIRED FOR NEW DATASETS -- (J)16       
JCPB JCP0443E COMMAND GROUP 01 : DB2 PROGRAM DSNTEP2 IN LIB SOFTP155.DB
              2.V91.N6Q1.SDSNLOAD DOES NOT EXIST -- (J)21             
CP0800W DIS STD: IT IS SUGGESTED THAT THE JOB NAME END WITH YOUR AGENCY

I am checking with our SYSADM. Once I execute this I will update about the results.
Thanks once again.
_________________
Satya
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Wed Sep 30, 2009 4:52 pm    Post subject: Reply with quote

Hi Kolusu,

I forgot to mention that the table has been created in UNICODE.

Since encoding scheme for the tablespace is UNICODE, the data is unloaded in UNICODE. To get the data unloaded and converted to EBCDIC, we need to add the following parameter to the unload statement: EBCDIC CCSID(37,37,37)

When I tried, EBCDIC CCSID(37,37,37)
the unload went fine and the data displayed was in a readble format.

Thanks once again for your time.
_________________
Satya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group