reading FIX tags

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

reading FIX tags

I am trying to read a number of FIX TAGS but can not guarentee the order that the tags will be placed in a file and between different files.. Is there a way to use the @ pointer in a way where the tag of interest is not always in the same order reletive to the other tags? Should I consider a different method to get the data I need? Maybe substring?

data ccgINmsgs;
infile &ccgorderspath &ccgrecord &readlength;
input timein 19.
@'35=' inmsgtype :$1.
@'49=' sendercompid :$30.
@'52=' fixtimein :$21.
@'11=' clordid :$50.
@'55=' symbol :$7.;

humantimein = input(substr(fixtimein,10,8), time8.);
humanDATEin = input(substr(fixtimein,1,8), ANYDTDTE8.);
complete_timein = dhms(humanDATEin,0,0,humantimein);
format complete_timein datetime16.;
format humanDATEin DATE8.;
*ns_timein = input(substr(timein,10,9), 9.);
RUN;

sample data: this string breaks because tag 52 comes before 49. this is out of the expected order.
13739260586369179258=FIX.4.3 9=0156 35=D 52=20130715-22:07:38 34=48 49=XXXX-CCG-1 56=FXALL 1=XXXX_XXXX 54=1 11=69432400003 38=1000000 55=GBP/USD 44=1.5101900 40=2 60=20130715-22:07:38 64=SPOT 10=060


Accepted Solutions
Solution
‎08-07-2013 10:58 AM
Respected Advisor
Posts: 3,799

Re: reading FIX tags

Posted in reply to ralph_muro

Can you start the search from column 1 each time.

filename FT15F001 temp;
data ccgINmsgs;
infile FT15F001;
input timein 19.
@
1 @'35=' inmsgtype :$1.
@
1 @'49=' sendercompid :$30.
@
1 @'52=' fixtimein :$21.
@
1 @'11=' clordid :$50.
@
1 @'55=' symbol :$7.;

humantimein = input(substr(fixtimein,
10,8), time8.);
humanDATEin = input(substr(fixtimein,1,8), ANYDTDTE8.);
complete_timein = dhms(humanDATEin,
0,0,humantimein);
format complete_timein datetime16.;
format humanDATEin DATE8.;
*ns_timein = input(substr(timein,10,9), 9.);
parmcards;
13739260586369179258=FIX.4.3 9=0156 35=D 52=20130715-22:07:38 34=48 49=XXXX-CCG-1 56=FXALL 1=XXXX_XXXX 54=1 11=69432400003 38=1000000 55=GBP/USD 44=1.5101900 40=2 60=20130715-22:07:38 64=SPOT 10=060
;;;;

View solution in original post


All Replies
Solution
‎08-07-2013 10:58 AM
Respected Advisor
Posts: 3,799

Re: reading FIX tags

Posted in reply to ralph_muro

Can you start the search from column 1 each time.

filename FT15F001 temp;
data ccgINmsgs;
infile FT15F001;
input timein 19.
@
1 @'35=' inmsgtype :$1.
@
1 @'49=' sendercompid :$30.
@
1 @'52=' fixtimein :$21.
@
1 @'11=' clordid :$50.
@
1 @'55=' symbol :$7.;

humantimein = input(substr(fixtimein,
10,8), time8.);
humanDATEin = input(substr(fixtimein,1,8), ANYDTDTE8.);
complete_timein = dhms(humanDATEin,
0,0,humantimein);
format complete_timein datetime16.;
format humanDATEin DATE8.;
*ns_timein = input(substr(timein,10,9), 9.);
parmcards;
13739260586369179258=FIX.4.3 9=0156 35=D 52=20130715-22:07:38 34=48 49=XXXX-CCG-1 56=FXALL 1=XXXX_XXXX 54=1 11=69432400003 38=1000000 55=GBP/USD 44=1.5101900 40=2 60=20130715-22:07:38 64=SPOT 10=060
;;;;
New Contributor
Posts: 4

Re: reading FIX tags

Posted in reply to data_null__

That did it... its the little things that get me. Smiley Wink

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 157 views
  • 0 likes
  • 2 in conversation