/////////////////////////////////////////////////////////
/////   NxCoreCategoryDumper.cpp                    /////
/////   Dump All Categories                         /////
/////   Author: Jeffrey Scott Donovan, 12-12-2009   /////
/////////////////////////////////////////////////////////
/////   To Read as Writtem:                         /////
/////   Tab Size: 4 Indent Size: 4                  /////
/////////////////////////////////////////////////////////
/////   Dependencies: NCoreLoadLib.cpp              /////
/////////////////////////////////////////////////////////
/////	Copyright (c) 2009. Eric Scott Hunsader		/////
/////////////////////////////////////////////////////////
/////	If you are a Subscriber to NxCore, you may	/////
/////	copy, modify, and distribute the contents	/////
/////	of this file without royalty, provided that /////
/////	you assume any and all responsibilty, and	/////
/////	forever release Eric Scott Hunsader and     /////
/////   Jeffrey Scott Donovan from any damage       /////
/////   claims, real, perceived, intentional, or    /////
/////   imagined.                					/////
/////////////////////////////////////////////////////////

#include <stdio.h>
#include "NxCoreLoadLib.h"         // DLL Load Library
#include "NxCoreCategoryDumper.h"  // Forwards for Category Functions

// NxCore Callback Function
//------------------------------------------------------------
int __stdcall OnNxCoreCallback(const NxCoreSystem* pNxCoreSys,const NxCoreMessage* pNxCoreMsg)
{
    // Process all Category Messages
	switch( pNxCoreMsg->MessageType ) 
    {
         case NxMSG_CATEGORY:   	

              // Display NxCore system time
              printf("NxCore Time: %02d:%02d:%02d \n",
                     pNxCoreSys->nxTime.Hour,
                     pNxCoreSys->nxTime.Minute,
                     pNxCoreSys->nxTime.Second);

             
              // Do specific category function based on value in Atom
              switch(pNxCoreMsg->coreData.Category.pnxStringCategory->Atom)										 
              {		  		
                  
	              case 1:onNxCoreCategory_1(pNxCoreMsg);break;
				  case 2:onNxCoreCategory_2(pNxCoreMsg);break;
                  case 4:onNxCoreCategory_4(pNxCoreMsg);break;                                                    									
                  case 6:onNxCoreCategory_6(pNxCoreMsg);break;                                                    									
                  case 7:onNxCoreCategory_7(pNxCoreMsg);break;                                                    									
                  case 8:onNxCoreCategory_8(pNxCoreMsg);break;
                  case 9:onNxCoreCategory_9(pNxCoreMsg);break;
                  case 10:onNxCoreCategory_10(pNxCoreMsg);break;
                  case 11:onNxCoreCategory_11(pNxCoreMsg);break;
                  case 12:onNxCoreCategory_12(pNxCoreMsg);break;
                  case 13:onNxCoreCategory_13(pNxCoreMsg);break;
                  case 14:onNxCoreCategory_14(pNxCoreMsg);break;
                  case 15:onNxCoreCategory_15(pNxCoreMsg);break;
                  case 16:onNxCoreCategory_16(pNxCoreMsg);break;
                  case 17:onNxCoreCategory_17(pNxCoreMsg);break;
                  case 18:onNxCoreCategory_18(pNxCoreMsg);break;
                  case 20:onNxCoreCategory_20(pNxCoreMsg);break;
                  case 21:onNxCoreCategory_21(pNxCoreMsg);break;
                  case 22:onNxCoreCategory_22(pNxCoreMsg);break;
                  case 23:onNxCoreCategory_23(pNxCoreMsg);break;
                  case 24:onNxCoreCategory_24(pNxCoreMsg);break;
                  case 25:onNxCoreCategory_25(pNxCoreMsg);break;
                  case 26:onNxCoreCategory_26(pNxCoreMsg);break;
                  case 27:onNxCoreCategory_27(pNxCoreMsg);break;
                  case 28:onNxCoreCategory_28(pNxCoreMsg);break;
                  case 29:onNxCoreCategory_29(pNxCoreMsg);break;
                  case 30:onNxCoreCategory_30(pNxCoreMsg);break;
                  case 33:onNxCoreCategory_33(pNxCoreMsg);break;
                  case 34:onNxCoreCategory_34(pNxCoreMsg);break;                  
                  case 40:onNxCoreCategory_40(pNxCoreMsg);break;
                  case 41:onNxCoreCategory_41(pNxCoreMsg);break;                      
                  case 42:onNxCoreCategory_42(pNxCoreMsg);break;
                  case 50:onNxCoreCategory_50(pNxCoreMsg);break;
                  case 51:onNxCoreCategory_51(pNxCoreMsg);break;
                  case 52:onNxCoreCategory_52(pNxCoreMsg);break;
                  case 54:onNxCoreCategory_54(pNxCoreMsg);break;
                  case 56:onNxCoreCategory_56(pNxCoreMsg);break;
                  case 60:onNxCoreCategory_60(pNxCoreMsg);break;
                  case 61:onNxCoreCategory_61(pNxCoreMsg);break;
                  case 62:onNxCoreCategory_62(pNxCoreMsg);break;
                  case 63:onNxCoreCategory_63(pNxCoreMsg);break;
                  case 64:onNxCoreCategory_64(pNxCoreMsg);break;
                  case 65:onNxCoreCategory_65(pNxCoreMsg);break;
                  case 66:onNxCoreCategory_66(pNxCoreMsg);break;
                  case 67:onNxCoreCategory_67(pNxCoreMsg);break;
                  case 68:onNxCoreCategory_68(pNxCoreMsg);break;
                  case 69:onNxCoreCategory_69(pNxCoreMsg);break;
                  case 70:onNxCoreCategory_70(pNxCoreMsg);break;
                  case 71:onNxCoreCategory_71(pNxCoreMsg);break;
                  case 80:onNxCoreCategory_80(pNxCoreMsg);break;
                  case 81:onNxCoreCategory_81(pNxCoreMsg);break;
                  case 82:onNxCoreCategory_82(pNxCoreMsg);break;
                  case 83:onNxCoreCategory_83(pNxCoreMsg);break;
                  case 84:onNxCoreCategory_84(pNxCoreMsg);break;
                  case 85:onNxCoreCategory_85(pNxCoreMsg);break;                                                          
			  }

              printf("\n");
			  break;                                     	 
  }
 
  return NxCALLBACKRETURN_CONTINUE;
}

// Main app entry function
//------------------------------------------------------------
// Usage: 
// NxCoreCategoryDumper tapefilename
//------------------------------------------------------------
int main(int argc, char* argv[])
{
    // If we can load the NxCore DLL
	if (LoadNxCore("NxCoreAPI.dll"))
    {
        // If tape filename argument passed in, use filename...
        if (argv[1])
            pfNxCoreProcessTape(argv[1],0,NxCF_EXCLUDE_CRC_CHECK | NxCF_EXCLUDE_QUOTES | NxCF_EXCLUDE_QUOTES2,0,OnNxCoreCallback);

        // Otherwise run in real time
        else
            pfNxCoreProcessTape("",0,NxCF_EXCLUDE_CRC_CHECK | NxCF_EXCLUDE_QUOTES | NxCF_EXCLUDE_QUOTES2,0,OnNxCoreCallback);
	
        // Unload NxCore DLL
        UnloadNxCore();
    }

    // Else print error message
    else
        printf("Could not find NxCoreAPI.dll! \n");

    // Exit app
	return 0;
}



//-------------------------------//
// INDIVIDUAL CATEGORY FUNCTIONS //
//-------------------------------//

// Small helper function to print symbol properly
//------------------------------------------------------------
void PrintSymbol(const NxCoreMessage *pNxCoreMsg)
{
    // If a valid option header and date-strike, print symbol + date code
     if (pNxCoreMsg->coreHeader.pnxOptionHdr)
	 {
	    // If pnxsDateAndStrike->String[0] == ' ', then this symbol is in new OSI format. 	
        if (pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[0]==' ')				   
        {
	        // Construct OSI symbol
		    printf("Category %d Message for Symbol:  %s%02d%02d%02d%c%08d\n",
			        pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
		            pNxCoreMsg->coreHeader.pnxStringSymbol->String,					 
			        pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Year-2000,
				    pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Month,
				    pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Day,
				    (pNxCoreMsg->coreHeader.pnxOptionHdr->PutCall == 0) ? 'C' : 'P',
				    pNxCoreMsg->coreHeader.pnxOptionHdr->strikePrice);
		}
		// Otherwise the symbol is in old OPRA format.	    
	    else
	    {
	      printf("Category %d Message for Symbol: %s%c%c\n",
			     pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
		         pNxCoreMsg->coreHeader.pnxStringSymbol->String,
		         pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[0],
	             pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[1]);	  
        }
	 }
     // Else non-option, print symbol only
     else
         printf("Category %d Message for Symbol: %s\n",
                pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
                pNxCoreMsg->coreHeader.pnxStringSymbol->String); 			 
}


//------------------------------------------------------------
void onNxCoreCategory_1(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
	
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Expiration Date: %02d/%02d/%d \n",
               pField->data.nxDate.Month,
               pField->data.nxDate.Day,
               pField->data.nxDate.Year);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Strike Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Est. Strike Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Opra Day Count: %d \n",pField->data.i32Bit);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("NxStrikeMatch: %d \n",pField->data.i32Bit);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("NxStrikeMatchEst: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_2(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Underlying Symbol: %s \n",pField->data.StringZ);
 			 
     // See table_NxST_EXCHANGE.html
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Underlying Exchange:  Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
		        pField->data.stringTableItem.idString);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Undeelying Symbol Key: %s \n",pField->data.pnxString->String);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Underlying Series Chain: %s \n",pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Special Settlement: %s \n",pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("Contract Multiplier: %d \n",pField->data.i32Bit);

	 pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Leap Year Code: %d \n",pField->data.i32Bit);

	 pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
     {         
         printf("Expiration Cycle: %d - ",pField->data.i32Bit);

         // See table_NxST_EXPIRATIONCYCLE.html
         switch(pField->data.i32Bit)
         {
             case 1:printf("Jan \n");break;
             case 2:printf("Feb \n");break;
             case 3:printf("Mar \n");break;
             case 4:printf("Wk1 \n");break;
             case 5:printf("Wk2 \n");break;
             case 6:printf("Wk3 \n");break;
             case 7:printf("Wk4 \n");break;
             case 8:printf("Wk5 \n");break;
             case 9:printf("Qtr \n");break;
         }
     }

     // See table_NxST_EXCHANGE.html
	 pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)			 
		 printf("OPRA Exchange List:  Table - %d  Exchange - %d \n",
                 pField->data.stringTableItem.ixTable,
		         pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_4(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Equity Name: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
        printf("CUSIP: %s \n",pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("SIC Code: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
        printf("Currency Code: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
        printf("NAICSCode: %s \n",pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
     {
         printf("Classification Map:  Table - %d \n",
                pField->data.stringTableItem.ixTable); 	

         // See Table NxST_EQUITYCLASSIFICATIONS
         if (pField->data.stringTableItem.idString & 0x0000001)
             printf("ETF \n");
         if (pField->data.stringTableItem.idString & 0x0000002)
             printf("NQGlobalSelect \n");
         if (pField->data.stringTableItem.idString & 0x0000010)
             printf("HasOptions \n");
         if (pField->data.stringTableItem.idString & 0x0000020)
             printf("HasSSFutures \n");
         if (pField->data.stringTableItem.idString & 0x0000100)
             printf("Dividend \n");
         if (pField->data.stringTableItem.idString & 0x0000200)
             printf("Split \n");
         if (pField->data.stringTableItem.idString & 0x0000400)
             printf("SymHist \n");
         if (pField->data.stringTableItem.idString & 0x0000800)
             printf("NewSymbol \n");
         if (pField->data.stringTableItem.idString & 0x0001000)
             printf("CloseEndFund \n");
         if (pField->data.stringTableItem.idString & 0x0002000)
             printf("ADR \n");         
     }
}

//------------------------------------------------------------
void onNxCoreCategory_6(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Name of Bond: %s \n",
               pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("CUSIP #: %s \n",
               pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Maturity Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Call Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Coupon Rate: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_7(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			 
     printf("Category 7 Message for Symbol: %s\n",
           pNxCoreMsg->coreHeader.pnxStringSymbol->String); 			 
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Index Name: %s \n",
               pField->data.StringZ); 			      
}

//------------------------------------------------------------
void onNxCoreCategory_8(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Name of Mutual Fund: %s \n",
               pField->data.StringZ);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("CUSIP #: %s \n",
                pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("Fund Code: %d \n",pField->data.i32Bit);
 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Footnotes: %s \n",
                pField->data.StringZ);
}

//------------------------------------------------------------
void onNxCoreCategory_9(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Year End Close: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Beta: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("Shares Outstanding: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Short Interest: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("PctHeldByInstitution: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("Last Qtr Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("Last Annual Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("Fiscal Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Assets: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)
         printf("Liabilities: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];
     if (pField->Set)
         printf("Long Term Debt: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];
     if (pField->Set)
         printf("EPSCurrentQtrMeanEst: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[12];
     if (pField->Set)
         printf("EPSCurrentYearMeanEst: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[13];
     if (pField->Set)
         printf("EPS Diluted: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[14];
     if (pField->Set)
         printf("EPS Latest12Month: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[15];
     if (pField->Set)
         printf("EPS3YearGrowthRate: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[16];
     if (pField->Set)
         printf("EPS5YearGrowthRate: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_10(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Volatility: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
         printf("Avg Volume: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("Market Cap: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("PE: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Yield: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));     
}

//------------------------------------------------------------
void onNxCoreCategory_11(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Year End Close: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Dividend: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Stock Split Dividend: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Record Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
         printf("Payment Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);


     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("ShortTermCapitalGains: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)
         printf("LongTermCapitalGains: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("OtherCapitalGains: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("UnallocateDistributions: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)
         printf("Accrued Interest: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];
     if (pField->Set)
         printf("Income Distribution: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];
     if (pField->Set)
         printf("Capital Distribution: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[12];
     if (pField->Set)
         printf("Par Value: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[13];
     if (pField->Set)			 
         printf("Security Subtype: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[14];
     if (pField->Set)
         printf("EstLongTermReturn: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_12(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Avg Maturity: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Seven Day Yield: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Annualized 7 Day Yield: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Total Assets: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));     
}

//------------------------------------------------------------
void onNxCoreCategory_13(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
         printf("High Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Low Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));     
}

//------------------------------------------------------------
void onNxCoreCategory_14(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
         printf("High Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Low Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));     
}

//------------------------------------------------------------
void onNxCoreCategory_15(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
         printf("High Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Low Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));     
}

//------------------------------------------------------------
void onNxCoreCategory_16(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Prev Close: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Close: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("Volume: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("Last Trade Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("Last Trade Exg: Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_OHLCFLAGS.html for OHLC flag values 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];		 
     if (pField->Set)
         printf("OHLC Flags:  Table - %d  Flags - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_17(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("First: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Vol Diff: %d \n",pField->data.i32Bit);     
}

//------------------------------------------------------------
void onNxCoreCategory_18(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("First: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Cancel Volume: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("Insert Volume: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Cancel Ticks: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)			 
         printf("Insert Ticks: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)			 
         printf("Admin Count: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)			 
         printf("Volume Added by Admin: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];
     if (pField->Set)			 
         printf("Volume Removed by Admin: %d \n",pField->data.i32Bit);     
}

//------------------------------------------------------------
void onNxCoreCategory_20(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Update Reason: Table - %d  Reason - ",
                pField->data.stringTableItem.ixTable);

         // See NxST_TRADEREPORTREASON
         switch(pField->data.stringTableItem.idString)
         {
             case 0:printf("Initial Refresh \n");break;
             case 1:printf("Post Insert \n");break;
             case 2:printf("Post Cancel \n");break;
             case 3:printf("Post Correction \n");break;
             case 4:printf("Synch Refresh \n");break;
             case 5:printf("Final \n");break;
             case 6:printf("Corrected Final \n");break;
         }
     }

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Prev Synch Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("Ref Exg Sequence: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Ticks: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("First Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("First Exg: Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)			 
         printf("First Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];		 
     if (pField->Set)
         printf("First Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)
         printf("High Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("High Exg: Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];
     if (pField->Set)			 
         printf("High Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[12];		 
     if (pField->Set)
         printf("High Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[13];
     if (pField->Set)
         printf("Low Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[14];		 
     if (pField->Set)
         printf("Low Exg: Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[15];
     if (pField->Set)			 
         printf("Low Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[16];		 
     if (pField->Set)
         printf("Low Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[17];
     if (pField->Set)
         printf("Last Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[18];		 
     if (pField->Set)
         printf("Last Exg: Table - %d  Exchange - %d \n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[19];
     if (pField->Set)			 
         printf("Last Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[20];		 
     if (pField->Set)
         printf("Last Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
}

//------------------------------------------------------------
void onNxCoreCategory_21(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("FormT Ticks: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
         printf("FormT Volume: %d \n",pField->data.i32Bit);     
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("First Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("First Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("First Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("First Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)
         printf("High Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("High Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)			 
         printf("High Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("High Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];
     if (pField->Set)
         printf("Low Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Low Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[12];
     if (pField->Set)			 
         printf("Low Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[13];		 
     if (pField->Set)
         printf("Low Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[14];
     if (pField->Set)
         printf("Last Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[15];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[16];
     if (pField->Set)			 
         printf("Last Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[17];		 
     if (pField->Set)
         printf("Last Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
}
 			 
//------------------------------------------------------------
void onNxCoreCategory_22(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
         printf("Size: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Price2: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("Size2: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("Time2: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("Exg2:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_23(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
     
     // Category 23 may contain up to 6 unique data points.
     // Each individual data point may contain 4 unique data elements.
     for (int i=0;i<=20;i+=4)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];
         if (pField->Set)
             printf("Price: %0.4f \n",
                    pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                          pField->data.nxPrice.PriceType));

         // See table_NxST_EXCHANGE.html for exchange codes
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];		 
         if (pField->Set)
             printf("Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+2];
         if (pField->Set)			 
             printf("ExgSeq: %d \n",pField->data.i32Bit);     

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+3];		 
         if (pField->Set)
             printf("ExgTime: %02d:%02d:%02d \n",
                    pField->data.nxTime.Hour,
                    pField->data.nxTime.Minute,
                    pField->data.nxTime.Second);
     }
}

//------------------------------------------------------------
void onNxCoreCategory_24(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Correction Type:  Table - %d  Type - ",
                pField->data.stringTableItem.ixTable);

         // See table_NxST_EXGCORRECTIONMAP.html
         if (pField->data.stringTableItem.idString & 0x00000001)
             printf("Correction \n");
         if (pField->data.stringTableItem.idString & 0x00000002)
             printf("Cancel \n");
         if (pField->data.stringTableItem.idString & 0x00000004)
             printf("Busted \n");
         if (pField->data.stringTableItem.idString & 0x00000008)
             printf("Entry Error \n");
         if (pField->data.stringTableItem.idString & 0x00000010)
             printf("Cancel Bid \n");
         if (pField->data.stringTableItem.idString & 0x00000020)
             printf("Cancel Ask \n");
     }

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
         printf("Org Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Org Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Org Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Org Size: %d \n",pField->data.i32Bit);     

     // See table_NxST_TRADECONDITION.html for possible Conditions 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("Org Condition: Table - %d  Condition - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("New Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("New Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("New Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)			 
         printf("New Size: %d \n",pField->data.i32Bit);     

     // See table_NxST_TRADECONDITION.html for possible Conditions 			 
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("New Condition: Table - %d  Condition - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_25(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
         printf("Bar Interval: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Bar Time Begin: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Bar Time End: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Ref Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("First Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("First Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("First Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("First Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("High Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("High Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];
     if (pField->Set)			 
         printf("High Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("High Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[12];
     if (pField->Set)
         printf("Low Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[13];		 
     if (pField->Set)
         printf("Low Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[14];
     if (pField->Set)			 
         printf("Low Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[15];		 
     if (pField->Set)
         printf("Low Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[16];
     if (pField->Set)
         printf("Last Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[17];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[18];
     if (pField->Set)			 
         printf("Last Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[19];		 
     if (pField->Set)
         printf("Last Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[20];
     if (pField->Set)
         printf("FilterHigh Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[21];		 
     if (pField->Set)
         printf("FilterHigh Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[22];
     if (pField->Set)			 
         printf("FilterHigh Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[23];		 
     if (pField->Set)
         printf("FilterHigh Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[24];
     if (pField->Set)
         printf("FilterLow Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[25];		 
     if (pField->Set)
         printf("FilterLow Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[26];
     if (pField->Set)			 
         printf("FilterLow Exg Seq: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[27];		 
     if (pField->Set)
         printf("FilterLow Exg Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
}

//------------------------------------------------------------
void onNxCoreCategory_26(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("AtBidTradePrice: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("AtAskTradePrice: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("AtBidTradeSize: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("AtAskTradeSize: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
         printf("AtBidTradeTime: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("AtAskTradeTime: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("AtBidTradeExg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("AtAskTradeExg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);     
}

//------------------------------------------------------------
void onNxCoreCategory_27(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("AtBidTradePrice: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("AtAskTradePrice: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("AtBidTradeSize: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("AtAskTradeSize: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
         printf("AtBidTradeTime: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("AtAskTradeTime: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];		 
     if (pField->Set)
         printf("AtBidTradeExg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];		 
     if (pField->Set)
         printf("AtAskTradeExg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);     
}

//------------------------------------------------------------
void onNxCoreCategory_28(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     printf("Category 28 Message for Symbol: %s\n",
           pNxCoreMsg->coreHeader.pnxStringSymbol->String); 

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Quote Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Ask Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
         printf("Quote Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);     
}

//------------------------------------------------------------
void onNxCoreCategory_29(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];		 
     if (pField->Set)
         printf("Quote Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
         printf("Ask Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
         printf("Quote Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_30(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     // Category 30 may contain up to 5 unique data points.
     // Each individual data point may contain 4 unique data elements.
     for (int i=0;i<=16;i+=4)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];		 
         if (pField->Set)
             printf("Effective Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];		 
         if (pField->Set)
             printf("Entry Type: %s \n",
                    pField->data.StringZ);

         // See table_NxST_EXCHANGE.html for exchange codes
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+2];		 
         if (pField->Set)
             printf("Exg Code:  Table - %d  Exchange - %d\n",
                    pField->data.stringTableItem.ixTable,
                    pField->data.stringTableItem.idString);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+3];		 
         if (pField->Set)
             printf("Old Symbol: %s \n",
                    pField->data.StringZ);
     }
}

//------------------------------------------------------------
void onNxCoreCategory_33(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Count: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Order: %d \n",pField->data.i32Bit);          
}

//------------------------------------------------------------
void onNxCoreCategory_34(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Financial Status Map: Table - %d  Status - ",
                pField->data.stringTableItem.ixTable);

         // See table_NxST_SYMBOLFNCLSTATUSMAP.html
         if (pField->data.stringTableItem.idString & 0x00000001)
             printf("Restored Good \n");
         if (pField->data.stringTableItem.idString & 0x00000002)
             printf("Bankrupt \n");
         if (pField->data.stringTableItem.idString & 0x00000004)
             printf("Deficient \n");
         if (pField->data.stringTableItem.idString & 0x00000008)
             printf("Deliquent \n");
         if (pField->data.stringTableItem.idString & 0x00000010)
             printf("Suspended \n");
     }
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
         printf("Status Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);
}

//------------------------------------------------------------
void onNxCoreCategory_40(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
     int Count=0;
     int i=2;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Strike Price: %0.3f \n",((double) pField->data.i32Bit / 1000.0));     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
     {
         printf("Entry Count: %d \n",pField->data.i32Bit);     
         Count=pField->data.i32Bit;
     }

     // Category 40 may contain up to (Entry Count) unique data points.     
     // Each data point contain the expiration months and strike char.
     for (int n=0;n<Count;n++)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];
         if (pField->Set)			 
             printf("Expire Months: %d \n",pField->data.i32Bit);     

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];
         if (pField->Set)			 
             printf("Strike Char: %d \n",pField->data.i32Bit);     

         i+=2;
     }
}

//------------------------------------------------------------
void onNxCoreCategory_41(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
     int Count=0;
     int i=2;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Strike Char: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)			 
     {
         printf("Entry Count: %d \n",pField->data.i32Bit);     
         Count=pField->data.i32Bit;
     }

     // Category 41 may contain up to (Entry Count) unique data points.     
     // Each data point contain the expiration months and strike char.
     for (int n=0;n<Count;n++)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];
         if (pField->Set)			 
             printf("Expire Months: %d \n",pField->data.i32Bit);     

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];
         if (pField->Set)			 
             printf("Strike Price: %0.3f \n",((double) pField->data.i32Bit / 1000.0));     

         i+=2;
     }
}

//------------------------------------------------------------
void onNxCoreCategory_42(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Open Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Close Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);
}

//------------------------------------------------------------
void onNxCoreCategory_50(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Flags: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Netchange: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("Bid Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_51(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Flags: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Netchange: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("Bid Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_52(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Flags: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Netchange: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("Bid Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_54(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Flags: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Netchange: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("Bid Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_56(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)			 
         printf("Flags: %d \n",pField->data.i32Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Last: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Netchange: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)			 
         printf("Volume: %I64d \n",pField->data.i64Bit);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Bid: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Ask: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
         printf("Last Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
         printf("Bid Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);

     // See table_NxST_EXCHANGE.html for exchange codes
     pField=&pNxCoreMsg->coreData.Category.pnxFields[11];		 
     if (pField->Set)
         printf("Ask Exg:  Table - %d  Exchange - %d\n",
                pField->data.stringTableItem.ixTable,
                pField->data.stringTableItem.idString);
}

//------------------------------------------------------------
void onNxCoreCategory_60(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     // Category 60 may contain up to 4 unique data points.
     // Each individual data point may contain 4 unique data elements.
     for (int i=0;i<=12;i+=4)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];		          
         if (pField->Set)
             printf("Split Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];
         if (pField->Set)
             printf("Old Shares: %d \n",pField->data.i32Bit);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+2];
         if (pField->Set)
             printf("New Shares: %d \n",pField->data.i32Bit);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+3];
         if (pField->Set)
             printf("Source Flags: %d \n",pField->data.i32Bit);
     }
}

//------------------------------------------------------------
void onNxCoreCategory_61(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     printf("Category 61 Message for Symbol: %s\n",
           pNxCoreMsg->coreHeader.pnxStringSymbol->String); 

     // Category 61 may contain up to 4 unique data points.
     // Each individual data point may contain 8 unique data elements.
     for (int i=0;i<=24;i+=8)
     {
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i];		          
         if (pField->Set)
             printf("Ex Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+1];		          
         if (pField->Set)
             printf("Record Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+2];		          
         if (pField->Set)
             printf("Payment Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+3];		          
         if (pField->Set)
             printf("Announcement Date: %02d/%02d/%d \n",
                    pField->data.nxDate.Month,
                    pField->data.nxDate.Day,
                    pField->data.nxDate.Year);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+4];
         if (pField->Set)
             printf("Amount: %0.4f \n",
                    pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                          pField->data.nxPrice.PriceType));

         // See table_NxST_EXDIVIDENDATTRIB.html for possible attribute values  			 
         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+5];		 
         if (pField->Set)
             printf("Attributes: Table - %d  Attributes - %d \n",
                    pField->data.stringTableItem.ixTable,
                    pField->data.stringTableItem.idString);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+6];
         if (pField->Set)
             printf("Less Amount: %d \n",pField->data.i32Bit);

         pField=&pNxCoreMsg->coreData.Category.pnxFields[i+7];
         if (pField->Set)
             printf("Source Flags: %d \n",pField->data.i32Bit);
     }
}

//------------------------------------------------------------
void onNxCoreCategory_62(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		          
     if (pField->Set)
         printf("AsOf Ex Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Indicated Rate: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Current Qtr: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Latest 12 Month: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Latest Fiscal: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_63(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Type:  Table - %d  Status - ",
                 pField->data.stringTableItem.ixTable);

         // See table_NxST_HALTSTATUS.html
         switch(pField->data.stringTableItem.idString)
         {
             case 0:printf("Resume \n");break;
             case 1:printf("Open Delay \n");break;
             case 2:printf("Halted \n");break;
             case 3:printf("NoOpenNoResume \n");break;
         }
     }

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		 
     if (pField->Set)
     {
         printf("Reason: Table - %d  Reason - ",
                pField->data.stringTableItem.ixTable);

         // See table_NxST_HALTREASONTYPE.html
         switch(pField->data.stringTableItem.idString)
         {
             case 1:printf("News \n");break;
             case 2:printf("News Disseminated \n");break;
             case 3:printf("Order Imbalance \n");break;
             case 4:printf("Equipment Change \n");break;
             case 5:printf("Pending Info \n");break;
             case 6:printf("Suspended \n");break;
             case 7:printf("SEC \n");break;
             case 8:printf("Not Specified \n");break;             
         }
     }

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Last Trade: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Halt Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     
}

//------------------------------------------------------------
void onNxCoreCategory_64(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Type:  Table - %d  Reason - ",
                pField->data.stringTableItem.ixTable);

         // See table_NxST_OPENINDICATIONTYPE.html
         switch(pField->data.stringTableItem.idString)
         {
             case 0:printf("Clear \n");break;
             case 1:printf("Normal \n");break;
             case 2:printf("New \n");break;
             case 3:printf("Correcting \n");break;
             case 4:printf("Cancel \n");break;
             case 5:printf("Range \n");break;
         }
     }
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("High: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Low: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Last Trade: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_65(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;
			 
     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
     {
         printf("Type:  Table - %d  Reason - ",
                pField->data.stringTableItem.ixTable);

          // See table_NxST_ORDERIMBALANCETYPE.html
         switch(pField->data.stringTableItem.idString)
         {
             case 0:printf("Clear \n");break;
             case 1:printf("Buy Side \n");break;
             case 2:printf("Sell Side \n");break;
             case 3:printf("Clear Closing \n");break;
             case 4:printf("BuySide Closing \n");break;
             case 5:printf("SellSide Closing \n");break;
             case 6:printf("Fast Market \n");break;
         }
     }
     
     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Buy Volume: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Sell Volume: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_66(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("UPC11830: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_67(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     printf("Category 67 Message for Symbol: %s\n",
           pNxCoreMsg->coreHeader.pnxStringSymbol->String); 
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Open Interest: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_68(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Volume Est: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Volume: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Ooen Int Start: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Open Int Final: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_69(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("MMID: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Status: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_70(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		 
     if (pField->Set)
        printf("Description: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Open Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Close Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
        printf("Root Symbol: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];		 
     if (pField->Set)
        printf("Call Symbol: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];		 
     if (pField->Set)
        printf("Put Symbol: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)
         printf("Futures Sec Subtype: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Futures OptsSec Subtype: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];		 
     if (pField->Set)
        printf("Contract Size: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];		 
     if (pField->Set)
        printf("Quoted Unit: %s \n",pField->data.StringZ);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[10];		 
     if (pField->Set)
        printf("Tick Value: %s \n",pField->data.StringZ);
}

//------------------------------------------------------------
void onNxCoreCategory_71(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Net Asset Value: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Nav Net Change: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Offer Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Market Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Wrap Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Current Yield: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));
}

//------------------------------------------------------------
void onNxCoreCategory_80(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];		          
     if (pField->Set)
         printf("Expiration Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		          
     if (pField->Set)
         printf("First Delivery Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);
}

//------------------------------------------------------------
void onNxCoreCategory_81(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Report Exg Seq: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Price1: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Bate1: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Price2: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Bate2: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Market Direction: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)
         printf("Market Trade Time1: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Matched Trade Seq1: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Market Trade Time2: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)
         printf("Matched Trade Seq2: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_82(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Report Exg Seq: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Price1: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Bate1: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Price2: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Bate2: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Market Direction: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[6];
     if (pField->Set)
         printf("Market Trade Time1: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[7];
     if (pField->Set)
         printf("Matched Trade Seq1: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[8];
     if (pField->Set)
         printf("Market Trade Time2: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[9];
     if (pField->Set)
         printf("Matched Trade Seq2: %d \n",pField->data.i32Bit);
}

//------------------------------------------------------------
void onNxCoreCategory_83(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Report Exg Seq: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Price1: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Bate1: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];
     if (pField->Set)
         printf("Price2: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[4];
     if (pField->Set)
         printf("Bate2: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[5];
     if (pField->Set)
         printf("Range Indc: %d \n",pField->data.i32Bit);     
}

//------------------------------------------------------------
void onNxCoreCategory_84(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Report Time: %02d:%02d:%02d \n",
                pField->data.nxTime.Hour,
                pField->data.nxTime.Minute,
                pField->data.nxTime.Second);     

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];
     if (pField->Set)
         printf("Report Exg Seq: %d \n",pField->data.i32Bit);

     pField=&pNxCoreMsg->coreData.Category.pnxFields[2];
     if (pField->Set)
         printf("Settlement: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[3];		 
     if (pField->Set)
     {
         printf("Flags:  Table - %d  Reason - ",
                pField->data.stringTableItem.ixTable);

         // See table_NxST_SETTLEFLAGMAP.html
         if (pField->data.stringTableItem.idString & 0x00000001)
             printf("One Session \n");
         if (pField->data.stringTableItem.idString & 0x00000002)
             printf("All Sessions \n");
         if (pField->data.stringTableItem.idString & 0x00000004)
             printf("Corrected \n");
         if (pField->data.stringTableItem.idString & 0x00000008)
             printf("Settle Only \n");
     }
}

//------------------------------------------------------------
void onNxCoreCategory_85(const NxCoreMessage *pNxCoreMsg)
{
     NxCategoryField *pField;

     // Print the category num and the Symbol
     PrintSymbol(pNxCoreMsg);
			    
     pField=&pNxCoreMsg->coreData.Category.pnxFields[0];
     if (pField->Set)
         printf("Strike Price: %0.4f \n",
                pfNxCorePriceToDouble(pField->data.nxPrice.Price,
                                      pField->data.nxPrice.PriceType));

     pField=&pNxCoreMsg->coreData.Category.pnxFields[1];		          
     if (pField->Set)
         printf("Expiration Date: %02d/%02d/%d \n",
                pField->data.nxDate.Month,
                pField->data.nxDate.Day,
                pField->data.nxDate.Year);
}

