dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can use dsnutil if you are on vsn 6 or lower. You can use dnsuproc (load & unload) if you have vsn 7 or above. Here is unload:
Code: |
//UNLOAD EXEC DSNUPROC,
// UID='STLETTER',UTPROC='',SYSTEM='VD0G'
//SYSREC DD DSN=ASTEX79.STLETTER.SYSREC,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(2,1))
//SYSPUNCH DD DSN=ASTEX79.STLETTER.SYSPUNCH,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=ASTEX79.UNLOAD.SQL(STLETTER),
// DISP=SHR
|
the parm system is for your db2 dsn.
uid is for the report. _ can be anything
sysrec contains the db2 data
syspunch contains the generated load parm after you have performed an unload. modifiy this to load a different table
sysin contains the 'WHEN' clause. you will need to know the tablespace name for your table.
Code: |
//LOAD EXEC DSNUPROC,
// UID='STLETTER',UTPROC='',SYSTEM='VD0G'
//SYSREC DD DSN=ASTEX79.STLETTER.SYSREC,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SORTWK01 DD DSN=&&SORTWK01,
// UNIT=SYSDA,SPACE=(CYL,(2,1))
//SORTWK02 DD DSN=&&SORTWK02,
// UNIT=SYSDA,SPACE=(CYL,(2,1))
//SORTOUT DD DSN=&&SORTOUT,
// UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSMAP DD DSN=ASTEX79.SYSUT1,DISP=(MOD,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSUT1 DD DSN=&&SYSUT1,DCB=BUFNO=10,
// UNIT=SYSDA,SPACE=(CYL,(2,1))
//SYSDISC DD DSN=ASTEX79.SYSDISC,DISP=(MOD,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSERR DD DSN=&&SYSERR,
|
the above is load jcl. The documentation for this is contained in the Utility Guide and Reference, SC26-9945-01. |
|