PTD Comma-Delimited File Standard

Home » PTD Comma-Delimited File Standard

PTD Comma-Delimited File Standard Revision 1.20
Aug 1, 2024
Programmers please read the following points carefully:

1. When string fields contain quotation marks within them the embedded quotation mark characters (symbol “) will be changed to the percent character (symbol %) when exported by the Post Time Daily. This is due to the fact that some languages do not deal with embedded quotes properly.

2. When strings contain no information they may be space filled or they may appear in the comma delimited files as two quotes with nothing in between. Our preference is that at some future time if the information for a string field is not available it will contain nothing between the quotes. But we have had many reports from Visual Basic programmers that truly empty strings (NULL) are in some way a problem. PLEASE MAKE SURE that your program can handle space filled strings and empty (NULL) strings. Also don’t assume that if a field is defined as string(22) that it will be filled with 22 spaces if empty. It might not. If your programming tool has some kind of trim function we would recommend that you trim all strings and then check their length to determine if they have information or not. That seems safe to us but other methods can work as well.

3. No assumptions should be made about the order of the entrants in the comma delimited files. The comma delimited files may be in post position order, saddle cloth order, or technically in any other order. The horses in the horse file currently export in the same order as the horses listed in the entrant file but while we DON’T expect that to change that is not guaranteed either.

4. We will be setting up a system to ensure that those of you who depend on comma delimted files will be emailed WELL in advance of any proposed changes and that you will have a chance to give us input into these changes.

5. Do not assume that there will be only up to ten pacelines per horse. We are currently putting out 12-14 pacelines at some tracks and may add more at a later date. Field 7 of the ENT file (numberOfPacelines) is the only valid way to determine how many pacelines are present for a horse. You can always choose to ignore those you don’t want to use.

6. Regarding Y2K compliance. There is NOTHING about year two thousand compliance (contrary to popular opinion) that REQUIRES four character date codes. However software which does NOT use two character date codes intelligently (e.g. where the year can’t be determined based on some semantic context) will have problems. We will notify you well prior to expanding the year code to four digits so that you have time to update your software. If you can plan for this now and allow for the possibility that the date fields will changed to MM/DD/YYYY in the future that would certainly be desireable. You can determine whether you are dealing with an old or new date by checking the length of the date field. New date fields will be 10 characters long. Old date fields will be 8 characters long.

7. Programmers – DO NOT HARDCODE the Version string in the sense that you are looking for ONE particular VALUE. We will update this with every major revision of this document. So if you need to check for changes incorporated into a particular version please convert field 1 of the RAC file (Version String) to a number and check by making sure that the version is 1.5 OR GREATER. Do NOT code for = to version 1.5 as your code will SURELY break when we update this field.

Sample comma delimited files are available on our website via the home page at http://www.posttimedaily.com.

The PTD Comma-Delimited File Standard defines a set of five comma delimited files which together comprise a card of racing at any racetrack.

Our current product, the Post Time Daily will allow exporting our current PTD data file to this PTD Comma Delimited File Standard.

The file naming conventions for the Export files are as follows where E is a constant, TTT is the track code (two or three characters), MM is the month, DD is the date, and YY is the two digit decimal year code. If the track code is two characters, for file naming purposes only, we will use an underscore for the third character.

ETTTMMDD.RYY (for race records)
ETTTMMDD.CYY (for class string info for race)
ETTTMMDD.EYY (for entry records – horse specific)
ETTTMMDD.WYY (for workout records)
ETTTMMDD.HYY (for horse records – paceline level)

While the file structures are not totally normalized (if you don’t understand this term don’t worry), we have tried to make them somewhat relational. The .CLS file which contains the conditions of the race from the racing form can be up to 4100 bytes in length. That is the class information that appears at the top of the race as the race conditions. Because of that, while it logically belongs in the .RAC file, we have extracted it into a separate file so that those of you who cannot handle a string file of this length can ignore it. AT THE END OF THIS CLASS STRING THERE WILL BE A CARRIAGE RETURN CHARACTER (hex 0x0D) followed by the bet types separated by additional CARRIAGE RETURNS if they appear on multiple lines.

The following conventions are followed in this comma-delimited file structure. All string fields are enclosed in double quotation marks. String fields which contain embedded quote characters (symbol “) will have these embedded quote characters changed to the percent character (symbol %). All numeric fields are not enclosed in quotes. Fields defined as date fields are expressed as strings of the form MM/DD/YY and enclosed in quotes just like any other string. Some combination of fields in each record will always constitute a unique key. And there is a well defined way to navigate all 1 to many relationships in these files.


Developers – THE NEXT NOTES ARE VERY IMPORTANT

The following is a list of fields which are NOT currently used but might
be in the future.

RAC FILE
none

CLS FILE
none

ENT FILE
Not currently used field 76, 77, 79

WOR FILE
Currently the product allows for up to 12 workouts in the Post Time Daily. Changes to this will require a product upgrade, but we might do this in the future. Don’t make ANY assumptions about how many work outs we will provide.

HOR FILE
not currently used field 21 (we hope to have this back shortly)
not currently used field 60, 61-64
not currently used field 80, 81 (we hope to have these back shortly)


NOTE: VERY IMPORTANT INFORMATION ABOUT FRACTIONAL TIMES IN THE HOR FILE
We have set up these times in such a way that traditional pace handicappers who need the 2f and 4f time in sprints, and the 4f and 6f time in routes will always find them in the firstCallTime (field 27) and the secondCallTime (field 28).

If a time appears with a ZERO value that means it was not available or is not recorded at a particular distance.

Sprints
(Obviously sprints 4f and shorter cannot have a 4f internal time!)
(Many of these shorter sprints will also not have an additionalFractionalTime)
(At some tracks these short sprints will have a 2f time but no 4f time)
(Example DeD at 4-1/2f seems to report 2f time and final time in some races
and 2f time and 4f time in others)

depending on the track where they are run)
firstCallTime 2f time
secondCallTime 4f time
finalTime as expected

additionalFractionalTime (field 30) is the stretch call time in sprints

Sprints between 5-1/2 and 6f
additionalFractionalTime (field 30) is 5/8 time

Sprints between 6-1/2 and 7-1/2f
additionalFractionalTime (field 30) is 6f time

Routes

firstCallTime 4f time
secondCallTime 6f time
finalTime as expected

Routes between 8f and 8-1/2f (inclusive)
additionalFractionalTime (field 30) is 2f time

Routes above 8-1/2f
additionalFractionalTime (field 30) is 8f time


File #1 the .Rxx file

There will be one race record for each race which is running at a track.

FieldTypeDescription
1string (4)Schema version (currently “1.20”)
2dateRace date (format: “MM/dd/yy”)
3string (3)Track ID
4numberRace number
5string (3)Actual track ID if a simulcast race, or blank if N/A
6numberActual race number if a simulcast race, or 0 if N/A
7numberRace distance (in feet). E.g., 6 furlongs is 3960 feet
8numberInner track indicator: 0 = No, 1 = Yes
9numberTurf indicator: 0 = No, 1 = Yes
10numberAbout distance indicator: 0 = No, 1 = Yes
11numberRace class:
0 = Maiden Claiming
1 = Maiden Special Weight
2 = Claiming
3 = Allowance
4 = Stakes
5 = Handicap
12numberMaximum claiming price
13numberMinimum claiming price
14numberPurse
15string (3)Age restrictions: “2”, “2UP”, “3”, “3UP”, “4”, “4UP”, “5”, “5UP”
16numberSex restrictions:
0 = MALE
1 = FEMALE
2 = MIXED
17numberStatebred indicator: 0 = No, 1 = Yes
18numberRestricted indicator: 0 = No, 1 = Yes
19numberGraded Stakes level:
0 = Not graded or unknown
1 = Grade 1
2 = Grade 2
3 = Grade 3
20string (21) Short class description. Examples:
“Alw 42000N1x”
“Alw 47500N$(3m)”
“LasFlorsBCH-G3”
“Md Sp Wt”
“Clm 25000”
21string (5)Local post time (format: “h:mm”)
22string (1) Local time zone:
“E” = Eastern
“C” = Central
“M” = Mountain
“P” = Pacific
23string (5)UTC adjustment amount (i.e., time difference between UTC and this track’s local time zone)
24string (25) Track name
25numberTrack record (in seconds). E.g., a time of 1:08:1 would be 68.2 seconds.
26string (5)Local post time using a 24-hour clock (format: “HH:mm”)
27stringReserved
28numberCourse type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
29numberReserved

File #2 the .Cxx file

There will be one .CLS record for each race which is running at a track. The first three fields (fields 1-3) provide a unique key for this record. It can be used to relate the .RAC and .CLS files. There is a one-to-one relationship between them. As explained above this is a separate record only for convenience of users who cannot handle a string field that is potentially 4100 bytes in size.

FieldTypeDescription
1dateRace date (format: “MM/dd/yy”)
2string (3)Track ID
3numberRace number
4string (4100)Full race description and available wagers.

NOTE: this field will also contain a carriage return control character (‘\r’), separating the race description from the available wagers.

File #3 the .Exx file

There will be many .ENT records for each race which is running at a track. Generally for each .RAC record there will be many .ENT records although there could be zero or 1 as well. The first three fields date, track, and racenumber can be used to find all the .ENT records for each .RAC record. There is a 1 to many relationship between .RAC and .ENT. The first four fields (fields 1-4) provide a unique key for this record. It can be used to relate the .ENT and .HOR files. There is a one-to-many relationship between the .ENT file and the .HOR file.

Note: Past performances that are downloaded after the saddle cloth numbers are assigned will have these fields already filled in without downloading the additional free saddle cloth file. If pps were downloaded prior to these assignments then the free saddle cloth file will still be needed to fill in these fields.

FieldTypeDescription
1dateRace date (format: “MM/dd/yy”)
2string (3)Track ID
3numberRace number
4string (22)Runner’s name
5string (4)Saddlecloth/Program number (N/A for “early” cards)
6string (5)Morning line odds (N/A for “early” cards)
7numberNumber of pacelines (e.g., will be 0 for first-time-starters)
8string (1)Entry letter (will be blank if not part of a coupled entry)
9numberScratched indicator: 0 = No, 1 = Yes

NOTE: this could indicate either an early scratch OR a runner scratched while using Post Time Daily.
10numberThe “current year” displayed in runner’s stats box (e.g., 2023).
11numberStarts in the current year
12numberWins in the current year
13numberPlaces in the current year
14numberShows in the current year
15numberEarnings in the current year
16numberThe “previous year” displayed in runner’s stats box (e.g., 2022).
17numberStarts in the previous year
18numberWins in the previous year
19numberPlaces in the previous year
20numberShows in the previous year
21numberEarnings in the previous year
22string (40) Owner’s name
23string (5)Color
24numberYear foaled
25numberMonth foaled
26string (5)Breeding location (i.e., state or country)
27numberAge
28string (1)Sex:
“c” = Colt
“h” = Horse
“g” = Gelding
“r” = Ridgling
“f” = Filly
“m” = Mare
“b” = Spayed mare
29string (22) Sire’s name
30string (22) Sire’s sire name (i.e., paternal grandsire)
31string (22) Dam’s name
32string (22) Dam’s sire name (i.e., maternal grandsire)
33string (22) Trainer’s name
34string (58) Breeder’s name
35numberTrainer starts (current meet)
36numberTrainer wins (current meet)
37numberTrainer places (current meet)
38numberTrainer shows (current meet)
39numberTrainer win percentage (current meet)
40numberLasix indicator: 0 = No, 1 = Yes
41numberBute indicator: 0 = No, 1 = Yes
42numberAssigned weight
43numberApprentice allowance
44string (22)Jockey’s name
45numberJockey starts (current meet)
46numberJockey wins (current meet)
47numberJockey places (current meet)
48numberJockey shows (current meet)
49numberJockey win percentage (current meet)
50numberClaiming price (zero if not eligible to be claimed)
51numberLifetime starts
52numberLifetime wins
53numberLifetime places
54numberLifetime shows
55numberLifetime earnings
56numberToday’s track starts
57numberToday’s track wins
58numberToday’s track places
59numberToday’s track shows
60numberToday’s track earnings
61numberTurf starts
62numberTurf wins
63numberTurf places
64numberTurf shows
65numberTurf earnings
66numberWet track starts
67numberWet track wins
68numberWet track places
69numberWet track shows
70numberWet track earnings
71numberTodays’ distance starts
72numberToday’s distance wins
73numberToday’s distance places
74numberToday’s distance shows
75numberToday’s distance earnings
76numberAlso-eligible indicator: 0 = No, 1 = Yes
77numberPart-of-field indicator: 0 = No, 1 = Yes

NOTE: not currently used.
78numberBlinkers: 0 = No change, 1 = On today, 2 = Off today
79numberBandages: 0 = No, 1 = Yes

NOTE: not currently used
80string (40) Jockey stats string (year-to-date/YTD)

Example: “23:(945 136 .14)”
81string (40) Trainer stats string (year-to-date/YTD)

Example: “23:(93 11 .12)”
82dateDate of horse’s sex change (blank if not applicable)
83string (1)Horse’s previous sex prior to change (blank if not applicable):
“c” = Colt
“h” = Horse
“r” = Ridgling
“f” = Filly
“m” = Mare
84numberPost position
85numberOff-track breeding rating
86numberTurf breeding rating
87numberFirst-time lasix indicator: 0 = No, 1 = Yes

File #4 the .Wxx file

There will be many .WOR records for each race which is running at a track. The first five fields (fields 1-5) provide a unique key for this record. The first four fields are used to relate the .ENT and .WOR files. There is a one-to-many relationship between them. Generally for each .ENT record there can be many .WOR records although there could be zero or 1 as well. While we currently only have up to 4 workouts for each horse, we expect to ship many more WOR records in the future. Don’t assume a maximum number. At least up to twelve will be provided in a future update.

FieldTypeDescription
1dateToday’s race date (format: “MM/dd/yy”)
2string (3)Today’s track ID
3numberToday’s race number
4string (22)Runner’s name
5dateWorkout date (format: “MM/dd/yy”)
6string (3)Workout track ID
7numberWorkout distance (in feet)
8numberInner track indicator: 0 = No, 1 = Yes
9numberTurf indicator: 0 = No, 1 = Yes
10numberTraining track indicator: 0 = No, 1 = Yes
11string (3)Workout track condition (E.g., “fst”, “fm”, etc.)
12numberWorkout time (in seconds)
13numberBreezing indicator: 0 = No, 1 = Yes
14numberHandily indicator: 0 = No, 1 = Yes
15numberBullet workout indicator: 0 = No, 1 = Yes
16numberDogs up indicator: 0 = No, 1 = Yes
17numberGate workout indicator: 0 = No, 1 = Yes
18numberWorkout rank
19numberTotal number of workouts at this distance and course type
20stringReserved
21stringReserved
22numberCourse type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
23numberReserved

File #5 the .Hxx file

There will be many .HOR records for each race which is running at a track. The first five fields (fields 1-5) provide a unique key for this record. The first four fields are used to relate the .ENT and .HOR files. There is a one-to-many relationship between them. Generally for each .ENT record there will be many .HOR records although there could be zero or 1 as well.

FieldTypeDescription
1dateToday’s race date (format: “MM/dd/yy”)
2string (3)Today’s track ID
3numberToday’s race number
4string (22)Runner’s name
5datePaceline date (format: “MM/dd/yy”)
6string (3)Paceline track ID
7numberPaceline race number
8numberDistance (in feet)
9numberInner track indicator: 0 = No, 1 = Yes
10numberTurf indicator: 0 = No, 1 = Yes
11numberAbout distance indicator: 0 = No, 1 = Yes
12numberOff-the-turf indicator: 0 = No, 1 = Yes
13string (3)Track condition
14numberThree-and-up indicator: 0 = No, 1 = Yes
15numberFemales-only indicator: 0 = No, 1 = Yes
16numberStatebreds-only indicator: 0 = No, 1 = Yes
17numberRestricted indicator: 0 = No, 1 = Yes
18string (3)Age restrictions: “2”, “2UP”, “3”, “3UP”, “4”, “4UP”, “5”, “5UP”
19numberSex restrictions:
0 = MALE
1 = FEMALE
2 = MIXED
20string (21)Short class description. Examples:
“Alw 42000N1x”
“Alw 47500N$(3m)”
“LasFlorsBCH-G3”
“Md Sp Wt”
“Clm 25000”
21string (45)Extended class info

NOTE: Generally available only for some foreign pacelines.
22numberPurse
23numberClaiming price (the price for which this horse was entered)
24numberRace class:
0 = Maiden Claiming
1 = Maiden Special Weight
2 = Claiming
3 = Allowance
4 = Stakes
5 = Handicap
25numberGraded Stakes level:
0 = Not graded or unknown
1 = Grade 1
2 = Grade 2
3 = Grade 3
26numberClaimed indicator: 0 = No, 1 = Yes
27numberFirst call time (in seconds)
28numberSecond call time (in seconds)
29numberFinal time (in seconds)
30numberAdditional fractional time (in seconds)
31numberPost position
32numberStart call position
33numberFirst call position
34numberSecond call position
35numberStretch call position
36numberFinish position
37numberFirst call beaten/leading lengths
38numberSecond call beaten/leading lengths
39numberStretch call beaten/leading lengths
40numberFinish beaten/leading lengths
41string (22)Jockey’s name
42numberLasix indicator: 0 = No, 1 = Yes
43numberBute indicator: 0 = No, 1 = Yes
44numberWeight carried
45numberBlinkers indicator: 0 = No, 1 = Yes
46numberFront wraps indicator: 0 = No, 1 = Yes
47numberFavorite indicator: 0 = No, 1 = Yes
48numberTote odds
49numberOdds ranking (e.g., the post time favorite would be 1, etc.)
50numberCoupled indicator: 0 = No, 1 = Yes
51numberDead heat indicator: 0 = No, 1 = Yes
52numberDisqualified indicator: 0 = No, 1 = Yes
53numberOfficial position

NOTE: if dsiqualified, this indicates where it was placed. If not part of a DQ, this will be zero.
54numberSpeed rating
55numberTrack variant
56numberAdvanced Speed Figure (ASF)

Notes:
-1 = not enough info to calculate figure (e.g., foreign paceline)
998 = an otherwise negative figure (shows as “-0” in PPs)
999 = otherwise incalculable figure (shows as “-” in PPs)
57numberPTD Early Pace Rating
58numberPTD Late Pace Rating
59numberPTD True Pace Rating
60numberPTD Speed Rating

NOTE: not currently used
61numberPTD Early Pace Variant (1st fraction)

NOTE: not currently used
62numberPTD Early Pace Variant (2nd fraction)

NOTE: not currently used
63numberPTD Final Time Variant (1st fraction)

NOTE: not currently used
64numberPTD Additional Fraction Variant (1st fraction)

NOTE: not currently used
65string (22)Winning horse’s name
66numberWinning horse’s weight carried
67numberWinning horse’s margin over next runner (in lengths)
68string (22)Second-place horse’s name
69numberSecond-place horse’s weight carried
70numberSecond place horse’s margin over next runner (in lengths)
71string (22)Third-place horse’s name
72numberThird-place horse’s weight carried
73numberThird-place horse’s margin over next runner (in lengths)
74string (22)Trouble line details
75numberNumber of runners in race
76string (22)If claimed, the original trainer’s name, otherwise blank
77string (35)If claimed, the original owner’s name, otherwise blank
78string (72)Extended trouble line details
79string (10)Disqualification comments (if available)
80stringForeign track description
81stringForeign track direction (if available; e.g., “LH” = Left-Hand, “RH” = Right-Hand, “Str” = “Straight”)
82stringTrainer’s name
83stringOwner’s name
84numberRace type:

0 = Thoroughbred
1 = Quarter horse
2 = Steeplechase
3 = Hurdle
4 = Foreign

NOTE: currently, only 0 and 4 are used.
85numberApprentice allowance
86numberCourse type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
87numberReserved


Note: If the Position Call was not available it will have a value of zero.

All beaten lengths in fields 37-40 are in decimal. A ‘hd’ is allowed .15, a neck 0.20 and a nose 0.10. So if the past performances says 3-1/4 we have 3.25. If the PPs says 1hd we have 0.15.

Also NOTE that if a horse is ON THE LEAD at a particular call position then the beaten lengths field will actually be the margin of lead at that position.

IMPORTANT – If the beaten lengths field is ZERO this indicates that the information was unavailable. No horse not on the lead can ever have a valid beaten lenght of zero. And no horse on the lead can ever have a leading margin of ZERO. Thus ZERO denotes a missing value.

IF a horse was EASED it will generally have a POSITION CALL OF ZERO and BEATEN LENGTHS of 99.75. Checking for 99 or more in the beaten lengths should be sufficient!

HORSE that had NO INFO at a point of call (for Example foreign horse internals) will have POSITION CALLS of ZERO and BEATEN LENGTHS OF ZERO.


Last updated on: 2/1/2022
Copyright 2022 by Value Tech, Inc.