File Structure/Field Map ForBill.txt File

Author: Jeff Platt

Last Modified: 11/29/2010

 

General Overview

The ForBill.txt file is a comma delimited text file that is created during Calc Races routines. The file structure is divided up into the following blocks:

  1. NameSpace
  2. Race Header Section
  3. Race Summary Section
  4. Horse Data Section

 

 

NameSpace

The NameSpace is a single data field inserted just once at the top of every ForBill.txt file. This field contains the date the Calc Races routine was run along with a file type identifier.

 

As of this writing, data in the NameSpace field looks like this:

“11/29/2010 Export file- comma delimited format.”

 

Race Header Section

The Race Header Section fields are inserted at the top of every race within the ForBill.txt file.  

 

There are four default Race Header Data Fields in the file. They are as follows:

  1. raceHeader
  2. classDescriptor
  3. classCode
  4. strBetTypes

 

Note: For the very first race in the file, the Race Header Section appears immediately beneath the namespace field.

 

Race Summary Section

The Race Summary Section only appears in the ForBil.txt file when the user has the Display Race Summary Box checked and persisted on the User Sys Defs Screen.

 

The purpose of the Race Summary data fields is to enable JCapper to display race summary info at the bottom of your HTML Report.

 

Data fields for the Race Summary Section appear as follows:

  1. strHeaderTrackCode
  2. strHeaderRaceNum
  3. strHeaderDate
  4. strMagicNumbers

 

Note: When the Display Race Summary Box is not checked and persisted on the User Sys Defs Screen, the Race Summary Section is not written to and does not appear in the ForBill.txt file.

 

Horse Data Section

The horse data fields are inserted into the ForBill.txt file immediately beneath the Race Header and Race Summary sections.

 

As of this writing there are currently 377 individual fields containing horse data. A field map of those data fields as they currently exist appears below.

 

Notes about the field map:

  1. Data Fields are designated by the “i” character followed by the field number in parenthesis.
  2. Comments/descriptions about horse data appear to the right of the apostrophe or single quote character.

 

 

'i(1)=pp

'i(2)=name

'i(3)=BRIS

'i(4)=rankForBris

'i(5)=diffForBris

'i(6)=rankForTop2

 

'Change 12-27-2005

'Replace duplicate for turnTime and rank

    'i(7)=TurnTime

    'i(8)=rankForTurnTime

'with intRTAD, intXthStartForRider

'i(7)=intRTAD

'i(8)=intXthStartForRider

'i(9)=BRIS3

'i(10)=RankForBRIS3

'i(11)=4#

'i(12)=RankFor4#

'i(13)=Recency Y or N

'i(14)=Age in Days to last out

'i(15)=Age in days to last work

'i(16)=BasicFitness Rating

'i(17)=rankForBasicFitness

'i(18)=DtShift (change in furlongs)

'i(19)=Morning Line Odds

'i(20)=Trainer Category

'i(21)=Name of Rider

'i(22)=Rider Rating

'i(23)=Trainer's Name

'i(24)=ESP Running Style

'i(25)=BRIS PRIME Power Rating

'i(26)=RankForPrimePower

'i(27)=DiffForPrimePower

'i(28)=Form Rating   (TRUE = yes)(FALSE = no)

'i(29)=LatePace

'i(30)=RankForLatePace

'i(31)= DiffForLatePace

 

 

 

'````````````````````````````````````````````````````````````````````````````

'AVAILABLE FIELD

'use it for position at 2nd call

       

    'Change 01-19-2006

    'Duplicate field for QSpeedPoints replaced with SecondCallPosLastOut

        'i(32)= Quirin Speed Points

 

'i(32)= SecondCallPosLastOut

'````````````````````````````````````````````````````````````````````````````

 

 

 

'PctE

'i(33)=percentEarly

'i(34)=RankForPercentEarly

'i(35)=diffFor4#

 

'CPace

'i(36)=comprehensivePaceRating

'i(37)=rankForComprehensivePace

'i(38)=diffForComprehensivePace

 

 

'i(39)=LR_Improvement

'i(40)=best abt (internal fraction) from last 10 races

'i(41)=rank for best abt

'i(42)=par for the level

'i(43)= comment containing speed~class_record at the distance

        'this field contains class shift info

       

'i(44)=E1 most recent race

'i(45)=E2 most recent race

'i(46)=V1 velocity in fps, best qtr of last two races

'i(47)=rank for V1

'i(48)=WOScore (formerly 45 day BRIS Figure)

'i(49)=Rank for WoScore (formerly rank for 45 day BRIS Figure)

 

'i(50)=furlongDays

'i(51)=rank for furlongdays

 

'i(52)= Finish Position Last Out

 

 

'```````````````````````````````````````````````````````````````````````````

'Change 01-19-2006

   

    'AVAILABLE FIELD

    'Can use this field for beaten lengths 2nd call last out

    'i(53)= Closing Ratio

 

'Replace duplicate field for Closing Ratio with SecondCallLengthsLastOut

 

'i(53)= SecondCallLengthsLastOut

'```````````````````````````````````````````````````````````````````````````

 

 

'i(54)=paceIndex- how hot is the pace in this race?

'i(55)=best E2 (4f) number from last 10 starts

'i(56)=rank for best E2

'i(57)=difference from top BestE2(diff to 2nd if category leader)

'i(58) = C Claimed in last

'i(59) = WOPct

 

 

'`````````````````````````````````````````````````````````````````````````

'CHANGE 12-20-2005

'Replace duplicate entry for WoBrill and Rank with PCR

    'i(60) = WoBrill fps

    'i(61) = Rank for WoBrill

'`````````````````````````````````````````````````````````````````````````

'i(60) = PCR

'i(61) = rankForPCR

 

 

 

 

'`````````````````````````````````````````````````````````````````````````

'CHANGE 12-29-2005

'Replace duplicate entry for RaBrill and Rank with diffForMyVelocity and post time

    'i(62) = RaBrill fps

    'i(63) = Rank for RaBrill

'`````````````````````````````````````````````````````````````````````````

'i(62) = diffForMyVelocity

'i(63) = Post Time

 

 

 

'i(64) = Equipment change

'i(65) = Weight Shift

 

'added  02-27-2004

'i(66)  lastRaceBrisFig

'i(67)  rankForLastRaceBrisFig

'i(68)  diffForLastRaceBrisFig

'i(69)  PScore

'i(70)  railPositionToday

'i(71)  ageSexCodeThisRace

'i(72)  topPrimeDiff

'i(73)  dblPredictiveScore

'i(74)  rankFordblPredictiveScore

 

 

'Change 01-24-2006

    'replace duplicate diffForWoBrill with intGreatestTrainingGap

    'i(75)  diffForWoBrill

'i(75)  intGreatestTrainingGap

 

 

 

'i(76)  dblWeightedFig

'i(77)  rankForWeightedFig

'i(78)  diffForWeightedFig

 

'i(79)  avgBris

'i(80)  rankForAvgBris

'i(81)  diffForAvgBris

 

'i(82)  QSpeedPoints

'i(83)  rankForQSpeedPoints

'i(84)  diffForQSpeedPoints

 

'i(85)  WoBrill

'i(86)  rankForWoBrill

'i(87)  diffForWoBrill

 

'i(88)  RaBrill

'i(89)  rankForRaBrill

'i(90)  diffForRaBrill

 

'i(91)  ageOfHorse

'i(92)  rankForAgeOfHorse

'i(93)  diffForAgeOfHorse

 

'i(94)  closingRatio

'i(95)  rankForClosingRatio

'i(96)  diffForClosingRatio

 

'i(97)  Paceline

'i(98)  rankForPaceline

'i(99)  diffForPaceline

 

'i(100) lifeTimeStarts

 

'i(101) WoScore

'i(102) rankForWoScore

'i(103) diffForWoScore

 

'i(104) jkyWinPct

'i(105) classDescriptorLastOut

 

 

'i(106) JRating

'i(107) rankForJRating

'i(108) diffForJRating

 

'i(109) sexOfHorse

 

'i(110) pF1

'i(111) pF2

 

 

'i(112) TurnTime

'i(113) rankForTurnTime

'i(114) diffForTurnTime

'i(115) workout improvement fitness flag

 

'i(116) ClassRating

'i(117) rankForClassRating

'i(118) diffForClassRating

 

'i(119) dblFormPoints

'i(120) rankForFormPoints

'i(121) diffForFormPoints

 

'i(122) dblVolatilityScore

 

'i(123) intFieldSize

'i(124) intTSRR (Turf Sprint Rider Rating)

'i(125) intTRRR (Turf Route Rider Rating)

'i(126) intDSRR (Dirt Sprint Rider Rating)

'i(127) intDRRR (Dirt Route Rider Rating)

 

'i(128) AvgE1

'i(129) rankForAvgE1

'i(130) diffForAvgE1

 

'i(131) sustainedPace

'i(132) rankForSustainedPace

'i(133) diffForSustainedPace

 

'i(134) raceStrength

'i(135) rankForRaceStrength

'i(136) diffForRaceStrength

 

'i(137) dblAssignedProbability

'i(138) rankForAssignedProbability

'i(139) diffForAssignedProbability

 

'i(140) intClaimRaces

'i(141) intClaimDays

 

'i(142) trainerWinsPassed

'i(143) trainerStartsPassed

 

'i(144) PaceLineBrisGap

 

 

'i(145) PaceFig_2F_InLast

'i(146) rankForPaceFig_2F_InLast

'i(147) DiffForPaceFig_2F_InLast

 

'i(148) decelFactor

 

'i(149) medicationToday

 

'i(150) paceFig_Late_InLast

'i(151) rankForpaceFig_Late_InLast

'i(152) diffForpaceFig_Late_InLast

'i(153) tSurfaceLastOut

 

'i(154) FinishCallBeatenLengths

'i(155) tracklastout

 

 

'i(156) xthStartOffOfLayoff

'i(157) xthStartOfCurrentMeet

'i(158) xthStartAfterLasix

 

'i(159) strNameOfSire

 

'````````````````````````````````````````````````````````````````````

'Results (When Available)

'````````````````````````````````````````````````````````````````````

'i(160) theOdds

'i(161) officialFinishPosition

'i(162) winPayoff

'i(163) placePayoff

'i(164) showPayoff

'i(165) exoticWagerType

'i(166) exoticWagerPayoff

'i(167) exoticWagerType2

'i(168) exoticWagerPayoff2

 

'i(169) SprintsUnderBeltAfterLayoff

'i(170) RoutesUnderBeltAfterLayoff

'i(171) intSizeOfFieldLastStart

 

 

'i(172) fimsInLastFour

'i(173) distCatHistory_LastRace

'i(174) distCatHistory_2Back

'i(175) xthStartForTrainer

 

'i(176) mLine   (same as field 19)

'i(177) mLineRank

'i(178) mLineDiff

'i(179  mLineLowForRace

 

'i(180) dblPAL

'i(181) rankForPAL

'i(182) diffForPAL

 

'i(183) dblTPR

'i(184) rankForTPR

'i(185) diffForTPR

 

'i(186) pctEarlyValueOfCP2

'i(187) pctEarlyRankOfCP2

 

'i(39) LR_Improvement

'i(188) LR_DiffFromTop

'i(189) Owner Name

 

'i(190) dblPMI

'i(191) rankForPMI

'i(192) diffForPMI

 

'i(193) dblCMI

'i(194) rankForCMI

'i(195) diffForCMI

 

'i(196) dblOptimal

'i(197) rankForOP

'i(198) diffForOP

 

'i(199) intXFORM_CANTRUN_Attrib

 

'i(200) intFirstTimeStarterCount

 

'i(201) purseToday

 

'i(202) stamina_LateOverE2

'i(203) rankForStamina_LateOverE2   (gap not supported - in this case I contend gap makes no sense whatsoever)

 

'i(204) PaceFig (last line pace fig using e2 + 5.2 ka:sqr of late)(aka JCapper PaceFig)

'i(205) rankForPaceFig

'i(206) diffForPaceFig

 

'new items 08-30-2005

'i(207) dblPctDirty

'i(208) trainerWinsMeet

'i(209) rankForTrainerWinsMeet

'i(210) trainerStartsMeet

'i(211) trainerWinsYear

'i(212) trainerStartsYear

'i(213) riderWinsMeet

'i(214) rankForRiderWinsMeet

'i(215) riderStartsMeet

'i(216) riderWinsYear

'i(217) riderStartsYear

 

'i(218) strRaceShape

 

'i(219) PaceImprov (PaceImprovement/WoBrill Improv)

'i(220) rankForPaceImprov

 

'i(221) CXNRating

'i(222) rankForCXNRating

 

'i(223) jSurfaceToday

 

'i(224) intLayoffCount

'i(225) intRouteDebutCount

'i(226) intTurfDebutCount

 

'i(227) consistencyRating

'i(228) rankForConsistencyRating

'i(229) diffForConsistencyRating

 

'i(230) PRating

'i(231) rankForPRating

'i(232) diffForPRating

 

 

'````````````````````````````````````````````````````

'New Fields Added for JCapper2007

'````````````````````````````````````````````````````

'(233)AFR

'(234)rankForAFR

'(235)diffForAFR

 

'(236)Alchemy

'(237)rankForAlchemy

'(238)diffForAlchemy

 

'(239)CFA

'(240)rankForCFA

'(241)diffForCFA

 

'(242)JPR

'(243)rankForJPR

'(244)diffForJPR

 

'(245)JPRClass

'(246)rankForJPRClass

'(247)diffForJPRClass

 

'(248)JPRMLProb

'(249)rankForJPRMLProb

'(250)diffForJPRMLProb

 

'(251)JPROfMLFav1

 

'(252)PEDRating

'(253)rankForPEDRating

'(254)diffForPEDRating

 

'(255)QRating

'(256)rankForQRating

'(257)diffForQRating

 

'(258)UPR

'(259)rankForUPR

'(260)diffForUPR

 

'(261)UPRMLProb

'(262)rankForUPRMLProb

'(263)diffForUPRMLProb

 

'(264)diffForCXNRating (See 221/222 for numVal and rank)

 

'`````````````````````````````````````````````````````````

'Compound Pace Array

'`````````````````````````````````````````````````````````

   

    '(265) CompoundE1

    '(266) rankForCompoundE1

    '(267) diffForCompoundE1

   

    '(268) CompoundE2

    '(269) rankForCompoundE2

    '(270) diffForCompoundE2

   

    '(271) CompoundTT

    '(272) rankForCompoundTT

    '(273) diffForCompoundTT

   

    '(274) CompoundLate

    '(275) rankForCompoundLate

    '(276) diffForCompoundLate

   

    '(277) CompoundSP

    '(278) rankForCompoundSP

    '(279) diffForCompoundSP

   

    '(280) CompoundAP

    '(281) rankForCompoundAP

    '(282) diffForCompoundAP

   

    '(283) CompoundPctE

    '(284) rankForCompoundPctE

    '(285) diffForCompoundPctE

 

    '(286) CompoundPaceFit

    '(287) rankForCompoundPaceFit

    '(288) diffForCompoundPaceFit

 

    '(289) BestWtFig

    '(290) rankForBestWtFig

    '(291) diffForBestWtFig

 

 

    '(292) LateSlant

    '(293) rankForLateSlant

    '(294) diffForLateSlant

 

    '(295) CompoundPctM

    '(296) rankForCompoundPctM

    '(297) diffForCompoundPctM

   

    '(298) UserFactor1

    '(299) rankForUserFactor1

    '(300) diffForUserFactor1

 

    '(301) UserFactor2

    '(302) rankForUserFactor2

    '(303) diffForUserFactor2

 

    '(304) UserFactor3

    '(305) rankForUserFactor3

    '(306) diffForUserFactor3

 

    '(307) UserFactor4

    '(308) rankForUserFactor4

    '(309) diffForUserFactor4

 

    '(310) UserFactor5

    '(311) rankForUserFactor5

    '(312) diffForUserFactor5

   

    '(313) UserFactor6

    '(314) rankForUserFactor6

    '(315) diffForUserFactor6

 

    '(316) UserFactor7

    '(317) rankForUserFactor7

    '(318) diffForUserFactor7

 

    '(319) UserFactor8

    '(320) rankForUserFactor8

    '(321) diffForUserFactor8

 

    '(322) strNameOfDam

    '(323) strNameOfDamsSire

    '(324) strNameOfSiresSire

   

    '(325) BCsCleanProb

    '(326) UPROpinionProb

 

 

        'Reserved for future use

        '(327) Reserved for future use

        '(328) Reserved for future use

        '(329) Reserved for future use

       

        'Reserved for future use

        '(330) Reserved for future use

        '(331) Reserved for future use

        '(332) Reserved for future use

 

        'Reserved for future use

        '(333) Reserved for future use

        '(334) Reserved for future use

        '(335) Reserved for future use

               

        'Reserved for future use

        '(336) Reserved for future use

        '(337) Reserved for future use

        '(338) Reserved for future use

       

        'FastSlowPace

        '(339) FastSlowPace

        '(340) rankForFastSlowPace

        '(341) diffForFastSlowPace

       

        'FastSlowFinal

        '(342) FastSlowFinal

        '(343) rankForFastSlowFinal

        '(344) diffForFastSlowFinal

       

   

   

   

    'changes added 6-7-2009 -

   

    'WillToWin

    'i(345) WillToWin

    'i(346) rankForWillToWin

    'i(347) diffForWillToWin

   

    'horseType

    'i(348) horseType

   

    'QDrive

    'i(349) intQDrive

   

 

    'Changes added 2-25-2010 --

   

    'Class_Consensus

    'i(350) PlattClassConsensus

    'i(351) rankPlattClassConsensus

    'i(352) gapPlattClassConsensus

       

    'Early_Consensus

    'i(353) PlattEarlyConsensus

    'i(354) rankPlattEarlyConsensus

    'i(355) gapPlattEarlyConsensus

   

    'Fig_Consensus

    'i(356) PlattFigConsensus

    'i(357) rankPlattFigConsensus

    'i(358) gapPlattFigConsensus

   

    'Form_Consensus

    'i(359) PlattFormConsensus

    'i(360) rankPlattFormConsensus

    'i(361) gapPlattFormConsensus

   

    'Late_Consensus

    'i(362) PlattLateConsensus

    'i(363) rankPlattLateConsensus

    'i(364) gapPlattLateConsensus

   

    'Power_Consensus

    'i(365) PlattPowerConsensus

    'i(366) rankPlattPowerConsensus

    'i(367) gapPlattPowerConsensus

   

    'ESPRaceShape

    'i(368) ESPRaceShape

   

    'HDWPScore

    'i(369) HDWPScore

    'i(370) rankHDWPScore

    'i(371) gapHDWPScore

   

    'RunStyle_HDW

    'i(372) HDWRunStyle

   

    'QSpeedPoints_Alt

    'i(373) QSpeedPoints_Alt

    'i(374) rankQSpeedPoints_Alt

    'i(375) gapQSpeedPoints_Alt

   

    'StageReadiness

    'i(376) intStageReadiness

   

    'i(377) END_OF_RECORD_MARKER

 

 

 

Parsing ForBill.txt File Data

This Section contains a few notes about parsing ForBill.txt data outside of JCapper.

 

end_of_race marker

Field 377 in the horse data contains an end of record marker for individual horse. For the last horse in each race, this field contains the following characters: “end_of_race.” All other horses in the file will have a blank space “ “ inserted into field 377.

 

The purpose for inserting these characters into the file is to facilitate writing of file parse routines outside of JCapper.

 

Sample Parse Routine

A sample parse routine (written in Visual Basic 6.0) appears below. The routine itself reads data from the ForBill.txt file (which is opened for input as File#1) and writes output data to a second file. Feel free to modify the routine to suit your own needs.

 

 

    'Declare local variables

    Dim a(377), b(377), c(377)

    Dim bolDisplayRaceSummary As Boolean

 

    'open ForBill.txt input file

    Open "c:\2010\Sept2010\ForBill.txt" For Input As #1

   

    'Open Mapper.txt output file

    Open "c:\2010\Sept2010\Mapper.txt" For Output As #2

   

   

    Do While Not EOF(1)

   

namespacestart:

       

        'Read File NameSpace

        Input #1, namespace

        Print #2, "Namespace: " & namespace

       

       

raceheaderstart:

       

        'Test for end of file

        If EOF(1) Then GoTo filedone:

       

        'read race header, classDescriptor, classCode, and BetTypes

        Input #1, raceHeader

        Input #1, classDescriptor

        Input #1, classCode

        Input #1, strBetTypes

       

        'Output race header, classDescriptor, classCode, and BetTypes

        Print #2, "RaceHeader", raceHeader

        Print #2, "classDescr", classDescriptor

        Print #2, "classCode", classCode

        Print #2, "BetTypes", strBetTypes

       

       

        'Race Summary (Controlled on User Sys Defs Screen)

       

        'has been set to True here

        '(set to False if box is not checked on User Sys Defs Screen)

        bolDisplayRaceSummary = True

       

        If bolDisplayRaceSummary Then

           

            'Read Race Summary

            Input #1, strHeaderTrackCode

            Input #1, strHeaderRaceNum

            Input #1, strHeaderDate

            Input #1, strMagicNumbers

       

            'Write Race Summary to output file

            Print #2, "HeaderTrackCode", strHeaderTrackCode

            Print #2, "HeaderRaceNum", strHeaderRaceNum

            Print #2, "HeaderDate", strHeaderDate

            Print #2, "MagicNumbers", strMagicNumbers

       

        End If

       

       

       

   

horsestart:

        'Read Horse Data

        For j = 1 To 377

            a(j) = "Field " & j

            Input #1, b(j)

           

            'Test End Of Race Marker

            If b(j) = "end_of_race." Then

                Print #2, "end_of_race marker", "end_of_race."

                GoTo raceheaderstart:

            Else

                'we are not at end_of_race marker -

                'keep reading horse data

                Print #2, a(j), b(j)

            End If

           

               

        Next j

       

        'Finished reading horse data. No end_of_race marker encountered.

        'Read the next horse.

        GoTo horsestart:

       

    Loop

 

    'Close files

filedone:

    Close

   

    MsgBox "Done.", vbInformation, "ForBill.txt Parse Routine"