
carfield
Junior Member

Posts: 6
Joined: Jul 2007
|
Fri Jul 06, 07 05:10 AM
|
|

I print the response using following code, it work for most of the time. However, for few time it print out broken characters like
2007-06-11 09:46:57,raw output of native process: *' *': .0000 : N.A. : 552^HK-2007061101:00:00-2007061108:10:00-null-null-2007061101:46:36-2007061101:45:35-552^HK|20070611|010000|20070611|081000-HK-0-0 2007-06-11 09:46:57,Mismatched code - gotten: Not found at bloomberg expected: *' *': .0000 : N.A. : 552 HK Equity 2007-06-11 09:46:57,*' *': .0000 : N.A. : 552 HK Equity,20070611,01:00:00,20070611,08:10:00,, 2007-06-11 09:46:59,raw output of native process: P,'à,': .0000 : N.A. P,'à,': .0000 : N.A. P,'à,': .0000 : N.A. 338 HK Equity: .0000 : N.A. : 338^HK-2007061101:00:00-2007061108:10:00-null-null-2007061101:46:37-2007061101:45:37-338^HK|20070611|010000|20070611|081000-HK-0-0 2007-06-11 09:46:59,Mismatched code - gotten: P,'à,' expected: .0000 : N.A. P,'à,': .0000 : N.A. 338 HK Equity: .0000 : N.A. : 338 HK Equity 2007-06-11 09:46:59,.0000 : N.A. P,'à,': .0000 : N.A. 338 HK Equity: .0000 : N.A. : 338 HK Equity,20070611,01:00:00,20070611,08:10:00,.0000,N.A. P,'à,'
Anyone experience this and is there any solution?
int decode_fields_x(bb_msg_fieldsx_t *f) { char *p; int lp; int i; int n; int iFoundFlag; char *pcSecName; /* ** Match this responses request_id to the one that we're ** expecting. Print a warning if we're getting a response ** to a request that's already been fufilled, or if we're ** getting a response to an unknown request */
iFoundFlag = 0;
i = search_req_id(plRequestID, iNumOfRequests, f->comm_header.request_id);
if (i == -1) { } else { piGotResponse[i] = 1; iFoundFlag = i+1;; iRecievedRequests ++; }
iFoundFlag--;
/* ** Get the pointer to the first security fields into p. The field_ptr array will ** have the pointers to the fields for each security in the order we ** requested them. For each security, we will get null-terminated ** strings with the field data, one after another in the order we ** requested the fields. */
for (i=0; i<f->comm_header.num_items; i++) { pcSecName = pcSecList + iFoundFlag*piNumOfSecInOneReq[0]*32 + i*32; printf(" %s", pcSecName); p = f->field_ptr[i];
for (n=0; n<iNumOfFields; n++) { lp = strlen(p)+1; if (is_Bulk_field(piFieldList[n])) { printf (":\t 0x%X Bulk Data:\t", piFieldList[n]); decodeBulkData (p); } else { printf (":\t \t%s\t", p); } p += lp; }
}
fflush(stdout);
if (iRecievedRequests == iNumOfRequests) { end=0; return 1; } else return 0;
}
|
|