DB2 database unload to a KSDS



IBM's flagship relational database management system

DB2 database unload to a KSDS

Postby jaggz » Thu Nov 18, 2010 5:13 pm

Hi,

I have a task of Unloading a DB2 database into a KSDS dataset. Could you please share your Input to proceed with this task. Well, I Thought of Unloading the DB2 DB into a PS DSN. Then sorting out the PS with Sort utility and converting it into a KSDS dsn. To achieve this can anyone share me a Sample JCL or Tip. Apology if my thoughts are not feasible.
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm
Has thanked: 8 times
Been thanked: 4 times

Re: DB2 database unload to a KSDS

 

Re: DB2 database unload to a KSDS

Postby dick scherrer » Fri Nov 19, 2010 12:23 am

Hello,

What you have described will do what you want.

Run an unload from database.
Run a load to the vsam file.

Where are you stuck?

Keep in mind that we will help you with your effort, but we won't actually do the work.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: DB2 database unload to a KSDS

Postby jaggz » Fri Nov 19, 2010 10:47 am

This is the below JCL I have created to unload a DB to a PS file. whats the way to include the DB attributes.


//A255209J JOB MSGCLASS=X,MSGLEVEL=(1,1),CLASS=A,             
//         REGION=5M,NOTIFY=&SYSUID                           
//STEP1 EXEC PGM=IKJEFT1B,DYNAMNBR=20,REGION=3072K             
//STEPLIB DD DSN=DSN811.SDSNLOAD,DISP=SHR                     
//ISPPROF DD UNIT=3390,SPACE=(TRK,(9,1,4)),                   
// DCB=(LRECL=175,BLKSIZE=27825,RECFM=FB,DSORG=PO)             
//SYSUDUMP DD SYSOUT=*                                         
//SYSOUT DD SYSOUT=*                                           
//REPORT DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                         
//SYSIN DD *                                                   
  DSN SYSTEM(DB2 SUBSYSTEM NAME)                               
  RUN PROGRAM(DSNTIAUL) PLAN(PLANNAME) PARMS('SQL') +         
  LIB('DSN811.RUNLIB.LOAD')                                   
//************************************************************
//SYSPRINT DD SYSOUT=*                   
//SYSPUNCH DD DUMMY                       
//SYSREC00 DD DSN=HLQ1.HLQ2.HLQ3,         
// DISP=(NEW,CATLG,KEEP),                 
// SPACE=(CYL,(200,200),RLSE),           
// UNIT=3390                             
//SYSIN DD *
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm
Has thanked: 8 times
Been thanked: 4 times

Re: DB2 database unload to a KSDS

Postby dick scherrer » Fri Nov 19, 2010 10:57 am

Hello,

whats the way to include the DB attributes.
What is this asking? The unload will create a sequential file that you can use to load the vsam file (if the vsam file is defined the same way).

If thei vsam file is defined differently, you would reformat the unloaded data to be compatible with the vsam data layout.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post