---
title: Tips for Using the Command Line
slug: help/en-us/dairycomp/commandline-tips
docTags: 
createdAt: 2026-01-26T11:43:19.475Z
---

Expand the topics below to learn more:

:::ExpandableHeading
## How Does the Command Parser Work?

Any information entered into DairyComp, whether selected from a menu or entered in the command line, is passed through a "command parser," which interprets what you entered and executes the necessary parts of the program to perform that function.

The parser takes the commands you enter, makes any substitutions of commands or expands partial command abbreviations you may have created through ALTER, and checks each part of the command for proper syntax. It then uses the major command word LIST, SHOW, etc. to execute that command.
:::

:::ExpandableHeading
## Upper/Lower Case

When entering commands, the parser is **not** case sensitive. This means that you can type commands in uppercase, lowercase, or combinations. The following commands are all interpreted the same way, and you are free to use whatever case you feel comfortable using:

- SHOW**ID LACT FDAT**
- **show id lact fdat**
- **Show ID Lact FDat**

Certain "control characters" or "unprintable characters" can be useful in modifying program performance. The "escape" or \[Esc] key is used to abort entries or commands and return to command mode.

All commands and inputs to the program are expected to be ended by hitting the **Enter** or **Return** key. This includes entering commands, cow ID numbers, and other prompted responses. Menus are an exception to this, they can be optionally defined to accept single character responses without pressing **Enter**. Also, control characters such as **Escape** to abort a listing do not need to be ended with **Enter**.
:::

:::ExpandableHeading
## Correct Command Errors

If you make a mistake, you can use the backspace and arrow keys to correct your mistake, or press \[Esc] to clear the command. If you enter a command that the parser does not recognize, you will get an error message. If you spelled an item name wrong, the parser will attempt to help out by bringing up the item list (and a "best guess" of what you meant), from which you can select the proper item.
:::

:::ExpandableHeading
## Retrieve Previous Commands

You can retrieve recent commands by using the following keyboard shortcuts:

- Press the **up** or **down arrow keys** to retrieve any of the previous 32 commands.
- Press **F4** to display all recent commands in a pick list.

Once retrieved, you can edit the command by adding new items, switches, or use the **Insert** key to insert new text into the command.
:::

:::ExpandableHeading
## View a List of Command Switches

Use the Switch Manager to see all the available switches for all commands. Click **Command?** at the left side of the command line or navigate to the Help menu to open the Switch Manager, then browse the list of commands and switches.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/pBoZ5o2FD94j-PhIGLlxT-20260508-200430.png" size="20" width="1150" height="736" darkWidth="1150" darkHeight="736" position="flex-start" showCaption="false"}

For a comprehensive list of commands and switches you can download, see [Command Line Quick Reference Sheets](docId\:ixz_JE7QEBldJwChguOfj).
:::

:::ExpandableHeading
## Try Command Line Assist

If you are new to using the command line, or just want assistance with it, try [Assist](docId\:HVprxaRwLtDqTfJrxaJAI). This enhancement to the command line helps you find the command components you need (such as items and events) without having to memorize exact names.
:::

:::ExpandableHeading
## Download PDF Quick‑Reference Guides for the DairyComp Command Line

- [DairyComp Command Syntax Quick Reference Guide](https://archbee-doc-uploads.s3.us-east-1.amazonaws.com/3h8pSJcGUXEi4HGCCYPTA/aRqbet7jhkzoTIkIi83H6-20260408-204620.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=AKIAYQNQCIXNP4ETOSXW%2F20260410%2Fus-east-1%2Fs3%2Faws4_request\&X-Amz-Date=20260410T182612Z\&X-Amz-Expires=86400\&X-Amz-Signature=591791925e8be5257fe006b0e148e7b9d9e3a9b83cc581ba13782b4266c40956\&X-Amz-SignedHeaders=host\&response-content-disposition=attachment%3B%20filename%3D%22DC305-CommandLineQuickRef.pdf%22\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
- [DairyComp Command Verbs and Switches](https://archbee-doc-uploads.s3.us-east-1.amazonaws.com/3h8pSJcGUXEi4HGCCYPTA/z890VGJ_2Dzg62vSUN-WG-20260408-204647.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=AKIAYQNQCIXNP4ETOSXW%2F20260410%2Fus-east-1%2Fs3%2Faws4_request\&X-Amz-Date=20260410T182725Z\&X-Amz-Expires=86400\&X-Amz-Signature=b73fc188485584a6e6787bf464f6f62c7f73ffcdce631d0b2f10c9214cdc7326\&X-Amz-SignedHeaders=host\&response-content-disposition=attachment%3B%20filename%3D%22DC305-VerbsAndSwitches.pdf%22\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
- [DairyComp Vocabulary](https://archbee-doc-uploads.s3.us-east-1.amazonaws.com/3h8pSJcGUXEi4HGCCYPTA/MmPGAIirF6lpqizXWbwLc-20260408-204816.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=AKIAYQNQCIXNP4ETOSXW%2F20260410%2Fus-east-1%2Fs3%2Faws4_request\&X-Amz-Date=20260410T182855Z\&X-Amz-Expires=86400\&X-Amz-Signature=d02f883ab472a8bb50abf4c6715eb059626cc5701f74effb397947f852c228a7\&X-Amz-SignedHeaders=host\&response-content-disposition=attachment%3B%20filename%3D%22DC305%20Vocabulary%20and%20Command%20Summary.pdf%22\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
:::

:::ExpandableHeading
## How Do I Fix a Command That Isn't Working?

If a command is not working, you can start by breaking it apart. Ask yourself these questions and see the illustration below to make sure your command has all the necessary parts:

- First, does it start with a command word like SHOW, LIST, or SUM?
- Next, ask <font color="#4283c7">**WHAT**</font> you want to see on your report (ID PEN DIM RPRO).
- Next, ask <font color="#B91C1C">**WHO**</font> you want to see on your report. These are the items you typically use in a **FOR** statement. Remember that you can use multiple constraints within your **FOR** statement.
- Last, ask <font color="#67854E">**HOW**</font> you want to view your list. You can use a **BY** or **DOWNBY** statement to sort your report.

<font color="#67854E">**EXAMPLES:**</font>

*Make a list of all animals that are less than 30 days in milk*:

**SHOW \`\`**<font color="#67854E">  </font>**\`\` FOR\`\`**<font color="#B91C1C">**&lt;30**</font>

*Make a list of all animals more than 30 days in milk in pen 4, sorted by reproductive status*:

**SHOW**<font color="#67854E">   </font> **FOR** <font color="#B91C1C">**&gt;30** **=4**</font> **BY**&#x20;

<font color="#67854E">**Common Errors if a Command is Broken:**</font>

- <font color="#67854E">**"Unknown item” error:**</font> Try selecting your command items from the picklist instead of typing them manually. Simply press F1 on your keyboard for a picklist of available items you can use.
- <font color="#67854E">**Your list is blank or doesn't contain any animals**</font>: Check your **FOR** statement to make sure you pull some animal‑specific data into your list.

<font color="#67854E">**Need More Help?**</font> See [Command Line](docId\:u_NbRVeQbF6NzSP1bc9E0) to learn more about the structure of a command, easily break commands apart, and build new commands!
:::

:::ExpandableHeading
## Related Topics

- [Troubleshoot the Command Line](docId\:SSOf7vqpmQN8mhbhnwmHQ)
:::

