13.07.2015 Views

IBM Flex System x240 w

IBM Flex System x240 w

IBM Flex System x240 w

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.

oline_dist_info,ord_num,dist_num,ware_num,oline_ol_num);rc2 = GenericWrite(&hnd2, Buffer, numBytes);if (rc2 != 0) { goto ool_done; }} /* for order_line */} /* for order */} /* for dist */} /* for ware */rc1 = GenericClose(&hnd2);rc2 = GenericClose(&hnd1);ool_done:}timestamp2 = current_time();elapse = timestamp2 - timestamp1;if (rc1 == 0 && rc2 == 0) {if (!quiet_mode) {fprintf(stdout,"\nORDERS & ORDER_LINE tables generated in %8.2f seconds.\n\n",elapse);fflush(stdout);}} else {fprintf(stderr,"\nORDERS & ORDER_LINE tables FAILED at (W %d D %d O %d OL %d) after %8.2f seconds.\n\n",ware_num, dist_num, ord_num, oline_ol_num, elapse);fflush(stderr);}void ScalingReport(void){/* Print Scaling Values */fprintf(stdout,"Scaling Values in Use\n");fprintf(stdout,"-------------------------------\n");fprintf(stdout,"Warehouses:%d\n", WAREHOUSES);fprintf(stdout,"Districts/Warehouse: %d\n", DISTRICTS_PER_WAREHOUSE);fprintf(stdout,"Customers/District: %d\n", CUSTOMERS_PER_DISTRICT);fprintf(stdout,"Items:%d\n", ITEMS);fprintf(stdout,"Stock/Warehouse: %d\n", STOCK_PER_WAREHOUSE);fprintf(stdout,"Min Order Lines/Order: %d\n", MIN_OL_PER_ORDER);fprintf(stdout,"Max Order Lines/Order: %d\n", MAX_OL_PER_ORDER);fprintf(stdout,"New Orders/District: %d\n", NU_ORDERS_PER_DISTRICT);fprintf(stdout,"-------------------------------\n");}dbgen/tpccrnd.c/******************************************************************************* Licensed Materials - Property of <strong>IBM</strong>**** (C) COPYRIGHT International Business Machines Corp. 1996, 2010** All Rights Reserved.**** US Government Users Restricted Rights - Use, duplication or** disclosure restricted by GSA ADP Schedule Contract with <strong>IBM</strong> Corp.*****************************************************************************//** tpccrnd.c - Random generation functions for TPC-C*/#include #include #include #include "db2tpcc.h"#include "tpccmisc.h"#include "lval.h"#include static char tbl_cust[CUSTOMERS_PER_DISTRICT];static char alnum[] ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";static char *last_name_parts[] ={"BAR","OUGHT",

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

Saved successfully!

Ooh no, something went wrong!