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

How to unload tables without using image copies ?


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

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Mon Jan 14, 2008 4:11 pm
Reply with quote

Hi,

I want to unload the prod tables and load it into my test region. Since i dont have RACF for the image copies, I need to take it directly from the prod. I can use import/export. But the thing is i need to execute in a batch job. Any pointers ?
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Jan 14, 2008 4:14 pm
Reply with quote

using DSNTIAUL?
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Mon Jan 14, 2008 4:30 pm
Reply with quote

Try searching forum on key "UNLOAD TABLE" and will find your answer.
Back to top
View user's profile Send private message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Mon Jan 14, 2008 4:38 pm
Reply with quote

Ya . using DSNTIAUL icon_smile.gif
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Jan 14, 2008 7:28 pm
Reply with quote

You will need to modify things slightly...

Unload from prod:

Code:

//S010     EXEC PGM=IKJEFT1B,DYNAMNBR=20                         
//STEPLIB  DD DSN=DB2.TEST.SDSNLOAD,DISP=SHR                     
//SYSIN    DD *                                                   
//     SELECT * FROM OWNER.TABLE WITH CS;                       
//                                                               
//SYSREC00 DD DSN=OUTPUT.FILE,DISP=(NEW,CATLG,DELETE),
        UNIT=DISK,SPACE=(TRK(1,1),RLSE)
//SYSPUNCH DD DSN=LOAD.CARD.OUTPUT,DISP=(,CATLG,DELETE),
        UNIT=DISK,SPACE=(TRK,(1,1),RLSE)                       
//SYSTSIN  DD DSN=DB2A.DBA.SYSIN(DSNTIAUL),DISP=SHR               
//SYSTSPRT DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=*                                           


Then modify the SYSPUNCH to have the correct OWNER.TABLE. Make sure the destination table is empty (for the options I have on my step).

Code:

//S010     EXEC PGM=DSNUTILB,REGION=8M,PARM='DB2T,LOADIBM'   
//STEPLIB  DD DSN=DB2.TEST.SDSNLOAD,DISP=SHR                 
//SYSREC00 DD DISP=SHR,DSN=OUTPUT.FILE                 
//SYSIN    DD DISP=SHR,DSN=LOAD.CARD.OUTPUT         
//*                                                           
//SYSUT1   DD UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)           
//SYSMAP   DD SPACE=(CYL,(100,100),,,ROUND),UNIT=(SORT,6)     
//$ORTPARM DD *                                               
DYNALLOC                                                     
/*                                                           
//SORTOUT  DD UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)           
//SYSPRINT DD SYSOUT=*                                       
//UTPRINT  DD SYSOUT=*                                       
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 Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top