How do we unload the DB2 tables using JCL?

Showing Answers 1 - 10 of 10 Answers

Albert

  • Nov 2nd, 2006
 

Using IBM tool IKJEFT01 or using BMC tool ADUUMAIN

  Was this answer useful?  Yes

yogendra shinde

  • Dec 22nd, 2006
 

Hi,

    BMC has more efficient tool "BMCLOAD" and "BMCUNLOAD"

    than IBM utilities. Use BMCUNLOAD to unload DB2 tables. You need to write a JCL wherein you need to supply empty files to unload the data from DB2 tables.

Thanks.

   

  Was this answer useful?  Yes

Smitha Brindavan

  • Mar 15th, 2007
 

If DBP1 is the subsystem name, then the below unload step can be used

//STEP001 EXEC DBP1UNLD,USER='USERNAME',ULDTAB='FILE1',DATE='UNLOAD(+1)'
//UNLOAD.SYSREC00 DD SPACE=(CYL,(65,10),RLSE)                        
//SYSIN     DD *                                                     
CORP.TBMC01

CORP.TBMC01 is the tablename
A new GDG version of name USERNAME.FILE1.UNLOAD1 will be created.

                                                          

  Was this answer useful?  Yes

We can use UNLOAD utility for loading a table to file. Following is a sample JCL.

//STEP1    EXEC DSNUPROC,UID='SMPLUNLD',UTPROC='',SYSTEM='DSN'
//SYSREC DD DSN=USERID.SMPLUNLD.SYSREC,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(2,1))
//SYSPUNCH DD DSN=USERID.SMPLUNLD.SYSPUNCH,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
UNLOAD TABLESPACE DSN8D81A.DSN8S81E
FROM TABLE DSN8810.EMP
WHEN (WORKDEPT = 'D11' AND SALARY > 25000)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions