13.07.2015 Views

IBM Flex System x240 w

IBM Flex System x240 w

IBM Flex System x240 w

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

create_random_a_string( stock_dist_03, 24, 24);create_random_a_string( stock_dist_04, 24, 24);create_random_a_string( stock_dist_05, 24, 24);create_random_a_string( stock_dist_06, 24, 24);create_random_a_string( stock_dist_07, 24, 24);create_random_a_string( stock_dist_08, 24, 24);create_random_a_string( stock_dist_09, 24, 24);create_random_a_string( stock_dist_10, 24, 24);/* create ORIGINAL field */create_a_string_with_original( stock_data, 26, 50, 10 );s_ytd = s_order_cnt = s_remote_cnt = 0;numBytes = sprintf(Buffer, fmtStock,s_remote_cnt,stock_quant,s_order_cnt,s_ytd,stock_data,stock_dist_01,stock_dist_02,stock_dist_03,stock_dist_04,stock_dist_05,stock_dist_06,stock_dist_07,stock_dist_08,stock_dist_09,stock_dist_10,stock_num,ware_num);rc = GenericWrite(&hnd, Buffer, numBytes);if (rc != 0) { goto stock_done; }} /* end for... */} /* end for... */rc = GenericClose(&hnd);stock_done:}timestamp2 = current_time();elapse = timestamp2 - timestamp1;if (rc == 0) {if (!quiet_mode) {fprintf(stdout,"\nSTOCK table generated in %8.2f seconds.\n\n",elapse);fflush(stdout);}} else {fprintf(stderr,"\nSTOCK table FAILED at (S %d W %d) after %8.2f seconds.\n\n",stock_num, ware_num, elapse);fflush(stderr);}/*----------------------------------------------------------------------*//* generate warehouse table *//*----------------------------------------------------------------------*/void gen_ware_tbl( void ){sqlint32 ware_num = 0 ;char ware_name[11] ;char ware_street_1[21] ;char ware_street_2[21] ;char ware_city[21] ;char ware_state[3] ;char ware_zip[10] ;double ware_tax ;double ware_YTD ;IOH_NUM numBytes;ioHandle hnd;char Buffer[1024];timestamp1 = current_time();rc = GenericOpen(&hnd, outtype1, outname1);if (rc != 0) { goto ware_done; }for (ware_num = ware_start; ware_num

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

Saved successfully!

Ooh no, something went wrong!