07.02.2013 Views

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

partitioning was used. The CREATE TABLE statement has the PARTITION BY<br />

clause. The table /<strong>BI</strong>C/AODSTEST00 is partitioned by CALDAY and it has two<br />

indexes, /<strong>BI</strong>C/AODSTEST00~0 and /<strong>BI</strong>C/AODSTEST~01, neither of which are<br />

partitioned.<br />

Now that the objects have been created in the database, use a <strong>DB2</strong> utility to<br />

reload the data into the newly created partitioned table. In this example we used<br />

the <strong>DB2</strong> LOAD utility. Use the LOG NO option <strong>for</strong> better per<strong>for</strong>mance.<br />

Refer to Example 7-2 <strong>for</strong> sample JCL <strong>for</strong> the <strong>DB2</strong> LOAD utility, and Example 7-3<br />

<strong>for</strong> a sample control statement <strong>for</strong> the <strong>DB2</strong> LOAD utility. For complete details on<br />

the <strong>DB2</strong> utilities, refer to <strong>DB2</strong> V9 Utility Guide and Reference.<br />

Example 7-2 Example of JCL <strong>for</strong> the <strong>DB2</strong> load utility<br />

//LOAD JOB (999,POK),'LOAD',CLASS=A,REGION=0M,<br />

// MSGCLASS=T,MSGLEVEL=(1,1),NOTIFY=&SYSUID<br />

/*JOBPARM S=SC04<br />

// JCLLIB ORDER=(<strong>DB2</strong>TU.PROCLIB)<br />

//*<br />

//STEP1 EXEC DSNUPROC,UID=SMPLOAD,UTPROC=,SYSTEM=<strong>DB2</strong>T<br />

//SYSERR DD DSN=LYDIA.LOAD2.STEP3.SYSERR,<br />

// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,<br />

// SPACE=(4096,(20,20),,,ROUND)<br />

//SYSDISC DD DSN=LYDIA.LOAD2.STEP3.SYSDISC,<br />

// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,<br />

// SPACE=(4096,(20,20),,,ROUND)<br />

//SYSMAP DD DSN=LYDIA.LOAD2.STEP3.SYSMAP,<br />

// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,<br />

// SPACE=(4096,(20,20),,,ROUND)<br />

//SYSUT1 DD DSN=LYDIA.LOAD2.STEP3.SYSUT1,<br />

// DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,<br />

// SPACE=(4096,(20,20),,,ROUND)<br />

//UTPRINT DD SYSOUT=*<br />

//SORTOUT DD DSN=LYDIA.LOAD2.STEP3.SORTOUT,<br />

// DISP=(NEW,DELETE,CATLG),UNIT=SYSDA,<br />

// SPACE=(4096,(20,20),,,ROUND)<br />

//SYSREC DD DSN=LYDIA.SMPLUNLD.SYSREC,DISP=SHR<br />

//SYSIN DD *<br />

Example 7-3 Example of a control statement <strong>for</strong> the <strong>DB2</strong> LOAD utility<br />

LOAD DATA INDDN(SYSREC)<br />

INTO TABLE "<strong>BI</strong>9DB"."/<strong>BI</strong>C/ADSOTEST00"<br />

( "/<strong>BI</strong>C/VERSION"<br />

P<strong>OS</strong>ITION( 00003:00010) VARGRAPHIC<br />

, "/<strong>BI</strong>C/SOLD_TO"<br />

P<strong>OS</strong>ITION( 00011:00032) VARGRAPHIC<br />

, "/<strong>BI</strong>C/SALESORG"<br />

120 <strong>Best</strong> <strong>Practices</strong> <strong>for</strong> <strong>SAP</strong> <strong>BI</strong> <strong>using</strong> <strong>DB2</strong> 9 <strong>for</strong> z/<strong>OS</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!