BESTPRED is run in standalone mode by running the program bestpred (bestpred.exe on MS Windows) from a command line. When the program is run the parameter file is read, data file read, calculations performed, and output written. Multiple animal records can be processed from the same file. During development of BESTPRED a file of 150,000 records was routinely processed with no difficulty. When running in standalone mode data are read from an input file based on the value of the source parameter (Table 4.1). Records from sources other than 10 (AIPL Format 4) are converted into http://aipl.arsusda.gov/formats/fmt4.htmlFormat 4 records and passed downstream for processing.
When using Source 10, only some of the fields from the complete Format 4 record are required (Table 4.2). Empty fields must be blank-filled so that column assignments
correspond to the format. The required fields are 17-byte cow ID, herd code, birth date, fresh (calving) date, parity, lactation length, and the number of test day segments. For each test day
segment the following fields must be included: test day DIM, number of milkings weighed, number of milkings sampled, the DHI supervision code, milk-recorded days, milk yield, fat
and protein percentages, and SCS. Previous days open is optional.
Description of input data sources
Source & Filename & Contents
Up to 20 test day segments may be provided on a Format 4 record. Each segment is 23-bytes long: the first segment begins at column 251, the second at 274 bytes, the third at 297 bytes, etc.
Records may end with the final segment in a lactation, and do not need to be padded to 710 columns.
Fields Required for a Minimal Format 4 Record
Byte Position(s) & Num Bytes & Field Format4.1
& Data Type4.2
& Field Description
When a complete Format 4 record is used, herd averages are calculated by subtracting the appropriate yield deviation (columns 201-216) from the standardized lactation yield (columns 188 - 200).
If a lactation average is not provided, as in a minimal Format 4, a breed average value, specified in the bestpred.f90 file, is used.
Source 15 is identical to Source 10 except that herd average 305-d ME yields for milk, fat, protein, and SCS are read from the file format4.means, which should contain a record
corresponding to each lactation in format4.dat. Both files should be sorted in the same order. The cow IDs and calving dates from the two files are checked against one another, and
BESTPRED will halt if there is a mismatch.
If you want to account for days open in the previous lactation (0 to 999 d) write the value into columns 246 through 248 of your Format 4 file. The value will be passed
downstream to the bestpred_fmt4 and bestpred subroutines. When a value of 0 is encountered no adjustement is made.
See About this document... for information on suggesting changes.
- ... Format4.1
- 0 = Zero filler; A = Alphanumeric data possible; P = Packed decimal; X = Numeric data only (use left zero fill)
- ... Type4.2
- CH = Character; CSL = Signed number with sign in leading (first) separate position (zero filled)