Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Scratches For Excel

Home Register
Log In
By Scratches For Excel
SILVER01HDW
7/12/2021
9:24:40 AM
I may be wrong, but it is my understanding that the scratchbot actually makes new jcp files in the DFM folder to account for changes.

Is there a simple way to copy those converted files and use them in excel.

Thank you

Reply
jeff
7/14/2021
5:46:25 PM
General Overview
.JCP Files are created when you run a .JCP File Build Routine in the HDW File Mgr.

Settings persisted in your Enhanced Settings Module give you control over and allow you to customize what gets inserted into your .JCP Files during .JCP File Build Routines that you run in the HDW File Mgr.

One of the things you get to control are the Rider Stats inserted into your .JCP Files.

You can also persist settings in the Enhanced Settings Module to make Scratch BOT parse Rider Changes from the Equibase Scratches and Changes XML - and overwrite the rider stats initially inserted into the .JCP file with rider stats for replacement riders parsed from the XML.

I need be CLEAR that:
  • Rider stats for replacement riders parsed by Scratch BOT from the Scratches and Changes XML are the ONLY data points in CHANGED by Scratch BOT in your .JCP files.

  • This happens when you have the correct settings persisted in your Enhanced Settings Module. With the correct settings persisted you create a condition called Rider Changes Enabled. Otherwise you create the default condition called Rider Changes Disabled.

  • Scratch BOT does NOT (repeat not) remove Scratched horses from your .JCP files. Nor does it write an indicator for Scratched horses to your .JCP files.

  • Scratch BOT does, however, write Scratched horses to the Scratches.txt file on your hard drive. Scratch BOT also writes indicators for scratches and changes to the Changes table in your JCapper.mdb file. And these are the indicators used by the JCapper program when you click the Calc Races button.


.JCP File Build Routines - Rider Stats
Below is a screenshot highlighting the two settings in the Enhanced Settings Module that control the rider stats that get inserted into your .JCP Files when you run a .JCP File Build Routine in the HDW File Mgr.

Note that these two settings also control rider stats for replacement riders parsed from the Scratches and Changes XML when you have Rider Changes Enabled in your Enhanced Settings Module.

Screenshot - Rider Stats:
Enhanced Settings Module - Rider Stats



Enhanced Settings - Rider Changes Enabled
Below is a screenshot highlighting the settings in the Enhanced Settings Module that result in Rider Changes Enabled.

Note that with Rider Changes Enabled - when Scratch BOT parses the Scratches and Changes XML - Scratch BOT will overwrite your .JCP files with rider stats of replacement riders parsed from the XML.

Also note that with Rider Changes Disabled - when Scratch BOT parses the Scratches and Changes XML - Scratch BOT skips parsing rider changes from the XML - and does not overwrite your .JCP files with rider stats of replacement riders when they are present in the XML.

Note that the Audible New Changes Message setting is optional. This setting merely controls whether or not Scratch BOT plays a sound file when New Changes are parsed from the XML. the Audible New Changes Message setting is not required to create a Rider Changes Enabled condition.


Screenshot - Rider Changes Enabled:
Enhanced Settings Module - Rider Changes Enabled


Enhanced Settings - Master ON Switch
Below is a screenshot showing the Master ON Switch in the Enhanced Settings Module.

The Master ON Switch enables you to set all of the settings at once - making it easier to create a Rider Changes Enabled condition as opposed to having to set each of the five settings individually.

Screenshot - Master ON Switch:
Enhanced Settings Module - Master ON Switch



.JCP Files - Lower and Upper Case File Extension
Immediately after you create .JCP files by running a .JCP File Build Routine in the HDW File Mgr - the file extension characters of your .jcp files will be lower case text.

The screenshot below shows .jcp files on the hard drive of one of my machines immediately after running a .jcp file build routine on 07-12-2021. Note that the characters of the .jcp file extensions are all lower case text.

Screenshot - .jcp file extension characters:
.jcp file extension chars


However, when your Enhanced Settings create a Rider Changes Enabled condition - when Scratch BOT parses rider changes from the XML and overwrites .JCP files with stats for replacement riders parsed from the XML - Scratch BOT changes the file extension from lower case to upper case.

If a .JCP file contains stats for at least one replacement rider - the file extension characters will be upper case.

If a .JCP file does not contain stats for at least one replacement rider - the file extension characters will still be lower case.

The screenshot below shows .JCP files on the hard drive of that same machine immediately after I used Scratch BOT to parse Scratches and Changes from the XML on the morning of 07-12-2021.

Note that the .JCP files for FEX and PHA now have file extensions that are upper case.

Those are the two .JCP files (so far that day) where Scratch BOT had overwritten rider stats for at least one replacement rider.

Also note that the other .jcp files still have lower case file extensions.

These .jcp files do not yet contain stats for replacement riders.

But that could change during the race day as new Scratches and Changes are parsed from in the XML.

Screenshot - .JCP file extension characters:
.JCP file extension chars


More to come...


-jp

.


Reply
SILVER01HDW
7/15/2021
5:33:02 AM
Thank you

Reply
jeff
7/15/2021
10:49:23 AM
I wrote the following in my (above) post:
--quote:
"
  • Scratch BOT does NOT (repeat not) remove Scratched horses from your .JCP files. Nor does it write an indicator for Scratched horses to your .JCP files.

  • Scratch BOT does, however, write Scratched horses to the Scratches.txt file on your hard drive. Scratch BOT also writes indicators for scratches and changes to the Changes table in your JCapper.mdb file. And these are the indicators used by the JCapper program when you click the Calc Races button.
"
--end quote


Q. So if you are looking to bring Scratches into Excel - and if Scratches aren't written to .JCP files - where, in JCapper, do you find a data source for Scratches - and how would you go about bringing data for Scratches into Excel?

A. The HDW F*.txt Chart Results File contains an indicator (Y=Scratched Otherwise Blank) for Scratched horses in field #97 and a letter code (A=Also Eligible, E=Early, G=Gate, M=Main Track Only, O=Off Turf, R=Entered in another race, S=Stewards, T=Trainer, V=Vet, Blank=Unknown) for the Scratch Reason in field #98.

The file format of the HDW F*.txt Chart Results File is comma delmited text.

Link to Field Mapping PDF here:
http://www.jcapper.com/messageboard/reports/Comma_Delimited_Charts_Spec.pdf

If I were whiteboarding out a data project to bring Scratches in the charts data found in HDW F*.txt Chart Results Files into Excel (or some other third party data project) it would probably look something like this:

  1. Create a separate (new) data folder for the project.

  2. Navigate to the current active data folder in the DFM.

  3. Cycle through all HDW F*.txt Chart Result Files on the current active data folder in the DFM.

  4. Put a copy of each HDW F*.txt Chart Results File on the folder (from step 2 above) onto the new folder (from step 1 above.)

  5. Change the file extension for each of the copied files (step 4 above) from ".TXT" (without the quotes) to ".CSV" (without the quotes.)

  6. Iterate through and each of the .CSV files (from step 5 above) and READ into Excel or other third party data project.

  7. At a minimum - SAVE data from the following fields to Excel or your alternate third party database project:

    • Track (field #1)

    • Date (field #2)

    • Race (field #3)

    • Horsename (field #51)

    • Scratch Indicator(field #97)

    • Scratch Reason (field #98)

  8. Repeat steps 6 and 7 (above) until all .CSV files have been processed.

  9. Repeat steps 1 through 8 (above) every time new HDW F*.txt Chart Result Files are downloaded.


That's It!

I hope I managed to type most of that out in a way that makes sense,

-jp

.








Reply
SILVER01HDW
7/16/2021
8:04:58 AM
Thank you Jeff

Reply
busseb
8/18/2021
2:45:44 PM
May want to check this but...

I think scratches are removed from the StartersToday table in the JCapper2.mdb file after CalcRaces.

If you can do a check of the .jcp against this table you can flag scratched horses or if you start with the StartersToday and do a lookup, you will only get horses that are running.

Let me know if this s right.

Reply
jeff
8/19/2021
11:29:02 AM
That's correct.

I designed it that way.

The only horses written to the StarterHistory Table are horses you can bet on:

Those with ODDS > 0.

The only horses written to the StartersToday Table are horses you can bet on:

Those that aren't Scratched.


-jp

.



Reply
Reply

Copyright © 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com