Animals Sold/Died by Date
2 min
animal records are not deleted once they are sold or have died however, records for sold or died animals are archived after a certain period of time this is important because it changes the command used to view a list of sold/died animals by date want to learn more about how animal records move to the archive? click here! the cleanup window contains options for controlling how animal records are moved to the archive to open this window, enter cleanup in the command line use the options on the settings tab to control how long the system will keep animal records in the cowfile after an animal has been marked as sold or died note that the cleanup window has a separate option for heifers you can set these fields to any of three options \<font color="#67854e">removed after 90 days\</font> \<font color="#67854e">removed immediately\</font> \<font color="#67854e">not removed\</font> note see restore an animal record docid\ hr1tgbzsgtpsoiuvjqcqx to learn more about the cleanup command and dairycomp archive files to view a list of sold or died animals by date that have not yet been archived pull the applicable animal records directly from the cowfile using the ardat item in the command the ardat (archive date) item tells the system the date on which the animal was sold or died so, to view a list of animals that were marked as sold on march 1, 2020 (and that have not yet been archived), your command would like this \<font color="#6b7280">list id\</font> \<font color="#eab308">for ardat=3/1/20 \d\</font> you can also enter a date range instead of a single date, as in \<font color="#6b7280">list id\</font> \<font color="#eab308">for ardat=3/1/20 4/15/20 \d\</font> the \d switch in the command tells the system to look for animals that have died to view a list of sold or died animals by date that have been moved to the archive use the events command to search for these animals in the dat and arc files (rather than the cowfile) in this case, you'll use switches to select the dates and the events to list for example \<font color="#eab308">events\</font> \<font color="#6b7280">bdat did sid\</font> \<font color="#eab308">\2si\</font> notice that the switch at the end of this command string has three parts \<font color="#67854e">\2\</font> tells dairycomp to run option 2 for the events command, which creates a list of animals and events \<font color="#67854e">\s\</font> tells dairycomp to prompt for a start and end date for the events here is where you'll provide the date(s) for which you want results \<font color="#67854e">\i \</font> tells dairycomp to prompt for the type of event(s) to include in the list for our purposes we would choose sold and/or died running this command generates a list of sold/died animals for the date(s) specified