switch $subkey => sub { case 1, sub {$acc = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: Account=$acc");}}; case 11, sub {$ordid = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: OrderId=$ordid");}}; case 14, sub {$lotsfill = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: LotsFilled=$lotsfill");}}; case 31, sub {$fillprice = $messagebin{$file}{$subkey}; if($debug){ &writelog(3,"DEBUG: FillPrice=$fillprice");}}; case 32, sub {$lotsact = $messagebin{$file}{$subkey}; if($debug){ &writelog(3,"DEBUG: LotsActioned=$lotsact");}}; case 34, sub {$transno = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: TransNo=$transno");}}; # As 35 can contain execution report, we make sure we can handle them. case 35, sub {my $new = $messagebin{$file}{$subkey}; if($new =~ m/D/i){$action = "New";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new =~ m/G/i){$action = "Amend";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new =~ m/F/i){$action = "Cancel";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new =~ /9/){$action = "Reject";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new =~ /8/){$action = "Report";if($debug){&writelog(3,"DEBUG: Action=$action");}} }; case 37, sub {$dborderid = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: DBOrderId=$dborderid");}}; case 38, sub {$lotsordered = $messagebin{$file}{$subkey};; if($debug){&writelog(3,"DEBUG: LotsOrdered=$lotsordered");}}; case 40, sub {$ordertype = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: OrderType=$ordertype");}}; case 41, sub {$amedorderid = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: AmendOrderId=$amedorderid");}}; case 44, sub {$orderprice = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: OrderPrice=$orderprice");}}; case 50, sub {$traderid = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: TraderId=$traderid");}}; case 54, sub {my $bs = $messagebin{$file}{$subkey}; if($bs == 1){$buysell = "Buy";if($debug){&writelog(3,"DEBUG: BuySell=$buysell");}} elsif($bs == 2){$buysell = "Sell";if($debug){&writelog(3,"DEBUG: BuySell=$buysell");}} }; case 55, sub {$consid = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: Contract=$consid");}}; case 100, sub {$exchange = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: Exchange=$exchange");}}; case 150, sub {my $new1 = $messagebin{$file}{$subkey}; if($new1 == 0){$filltype = "Ack";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /1/){$filltype = "Part Fill";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /2/){$filltype = "Full Fill";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /3/){$filltype = "Done for Day";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /4/){$filltype = "Ack Cancel";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /5/){$filltype = "Ack Amend";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /6/){$filltype = "Pending Cancel";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /7/){$filltype = "Stopped";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /8/){$filltype = "Rejected";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ /9/){$filltype = "Suspended";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ m/A/i){$filltype = "Pending new";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ m/B/i){$filltype = "Calculated";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ m/C/i){$filltype = "Expired";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ m/D/i){$filltype = "Restated";if($debug){&writelog(3,"DEBUG: Action=$action");}} elsif($new1 =~ m/E/i){$filltype = "Pending Replace";if($debug){&writelog(3,"DEBUG: Action=$action");}} else{$filltype = "Unknown";if($debug){&writelog(3,"DEBUG: Action=$action");}} }; case 151, sub {$lotsstillopen = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: LotsOpen=$lotsstillopen");}}; case 200, sub {$maturity = $messagebin{$file}{$subkey}; if($debug){&writelog(3,"DEBUG: Maturity=$maturity");}}; };