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.

8,8,8,8,8,8,8,8,8,8, /*20-29*/8,8,8,8,8,8,8,8,8,8, /*30-39*/8,8,8,8,8,8,8,8,8,8, /*40-49*/8,8,8,8,8,8,8,8,8,8, /*50-59*/8,8,8,8,8,1,8,8,8,8, /*60-69*/8,4,8,3,8,8,0,8,2,7, /*70-79*/8,8,6,8,8,8,8,8,8,8, /*80-89*/8,8,8,8,8,8,8,8,8,8, /*90-99*/8,8,8,8,8,8,8,8,8,8, /*100-109*/8,8,8,8,8,8,8,8,8,8, /*110-119*/8,8,8,8,8,8,8,8,8,8, /*120-129*/8,8,8,8,8,8,8,8,8,8, /*130-139*/8,8,8,8,8,8,8,8,8,8, /*140-149*/8,8,8,8,8,8,8,8,8,8, /*150-159*/8,8,8,8,8,8,8,8,8,8, /*160-169*/8,8,8,8,8,8,8,8,8,8, /*170-179*/8,8,8,8,8,8,8,8,8,8, /*180-189*/8,8,8,8,8,8,8,8,8,8, /*190-199*/8,8,8,8,8,8,8,8,8,8, /*200-209*/8,8,8,8,8,8,8,8,8,8, /*210-219*/8,8,8,8,8,8,8,8,8,8, /*220-229*/8,8,8,8,8,8,8,8,8,8, /*230-239*/8,8,8,8,8,8,8,8,8,8, /*240-249*/8,8,8,8,8}; /*250-254*/static int is_ORIGINAL( char *string, short length ){char*cur_string;char*end_string;unsigned char *skips;intskip_dist;int result = 0;cur_string = string+7;end_string = string + length;skips = skip;while (cur_string < end_string){skip_dist = skips[*cur_string];while ( (skip_dist > 0) && (cur_string < end_string) ){skip_dist = skips[*(cur_string += skip_dist)];}if (cur_string >= end_string)goto exit;if ( cur_string[-4] != 'G' )goto noMatch;if ( memcmp( cur_string-7, "ORIGINAL", 8 ) == 0 ){result = 1;goto exit;}noMatch:cur_string += 8;} /* end while */exit:return ( result ) ;}// ----------------------------------------------------------------// Order Status SERVER// ----------------------------------------------------------------#undef w_id#undef d_id#undef c_id_input#undef o_id#undef o_entry_d#undef o_carrier_d#undef c_id#undef c_first#undef c_middle#undef c_last#undef c_balanceSQL_API_RC order_status_internal( char *pin, char *pout ){struct in_ordstat_struct * in_ordstat = (struct in_ordstat_struct *) pin ;struct out_ordstat_struct * ordstat = (struct out_ordstat_struct *) pout ;struct sqlca sqlca ;EXEC SQL BEGIN DECLARE SECTION;// From input values//##sqlint32 w_id ;//##short d_id;sqlint32 c_id_input ;struct s_data_type { short len ; char data[ 16 ] ; } c_last_input ;// From queries// From initial querysqlint32 o_id ;//##sqlint32 c_id ;short o_carrier_id ;//##sqlint64 o_entry_d ;char c_first[ 16 ] ;char c_middle[ 2 ] ;//##char c_last[ 16 ] ;double c_balance ;// From cursorsqlint32 ol_i_id ;sqlint32 ol_supply_w_id ;short ol_quantity ;float ol_amount ;char ol_delivery_d [27] ;//##char o_entry_d[ 27 ] ;EXEC SQL END DECLARE SECTION;//##struct s_data_type { short len ; char data[ 16 ] ; } c_last_input ;int storedProcRc ;int itemArrayIndex = 0 ;#define w_id in_ordstat->s_W_ID ;#define d_id in_ordstat->s_D_ID ;#define c_id_inputin_ordstat->s_C_ID#define o_idordstat->s_O_ID#define o_entry_dordstat->s_O_ENTRY_D_time#define o_carrier_id ordstat->s_O_CARRIER_ID#define c_idordstat->s_C_ID#define c_firstordstat->s_C_FIRST#define c_middleordstat->s_C_MIDDLE#define c_lastordstat->s_C_LAST#define c_balanceordstat->s_C_BALANCEEXEC SQL DECLARE read_orderline_cur CURSOR FORSELECT OL_I_ID, OL_SUPPLY_W_ID, OL_QUANTITY, OL_AMOUNT, OL_DELIVERY_DFROM ORDER_LINEWHERE OL_W_ID = :w_idAND OL_D_ID = :d_idAND OL_O_ID = :o_idFOR FETCH ONLY ;ordstat->deadlocks = -1 ;#ifdef DEBUGITord_debug(ordstat, in_ordstat, "SP upon entry");#endifretry_tran:ordstat->deadlocks ++ ;if ( c_id_input == 0 ){c_last_input.len = strlen( in_ordstat->s_C_LAST ) ;memcpy( c_last_input.data , in_ordstat->s_C_LAST , c_last_input.len ) ;EXEC SQLSELECT O_ID, O_CARRIER_ID, O_ENTRY_D, C_BALANCE, C_FIRST, C_MIDDLE, C_IDINTO :o_id, :o_carrier_id , :o_entry_d , :c_balance, :c_first, :c_middle, :c_idFROM TABLE ( ORD_C_LAST( :w_id, :d_id, :c_last_input)) AS ORD_C_LAST;}else{EXEC SQLSELECT O_ID, O_CARRIER_ID, O_ENTRY_D , C_BALANCE, C_FIRST, C_MIDDLE ,C_LAST

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

Saved successfully!

Ooh no, something went wrong!