---
title: Pens
slug: help/en-us/dairycomp/pens-ref
docTags: 
createdAt: 2026-01-26T11:43:20.128Z
---

The ALTER4: Pens option allows you to manage your DairyComp pens or to view a historical pen inventory. You can create new pens, and also delete, rename, or change (ALTER) them.

To open the Pens List window, enter ALTER in the command line, then select **\[4] Pens** from the menu. Alternatively, you can enter **ALTER\4&#x20;**&#x64;irectly in the command line.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/2CXQJV_-NmU5gwgC94pWk_alter-pens.png" size="32" width="1144" height="576" position="flex-start" darkWidth="1144" darkHeight="576" showCaption="false"}

When setting up your pens, DairyComp can automatically record the date when an animal enters a pen. This helps accurately reflect an animal's reproductive or health status. For example:

- <font color="#67854E">**BULL Pens**</font>: Recording the move-in date for a BULL pen helps you estimate conception dates. See [BULL Pen](docId\:noM61wLBr2IbwGQEAlD6E)  and [Pen Change](docId\:noM61wLBr2IbwGQEAlD6E) to learn more.
- <font color="#67854E">**AI Pens\:**</font> Many dairies only enroll animals in breeding or sync programs when they move into an active AI pen (AIPEN>0). Recording this move-in date is important because it allows you to:
  - Enter **BREDSUM** **AIDAT\Y** in the command line to quickly see your BREDSUM analysis and monitor key metrics like reproductive performance, conception rate, and pregnancy rate.
  - Enter **BREDSUM** FOR **AIPEN>0** in the command line to filter your BREDSUM analysis to include only animals that have moved into AI pens.
  - Create more flexible and future-proof command abbreviations using **ALTER\3**, because the **AIPEN>0&#x20;**&#x66;ilter automatically includes all animals in any AI pen. This eliminates the need to manually update your abbreviations whenever a specific AI pen number changes or a new one is added.
    See [AI Pen ](docId\:noM61wLBr2IbwGQEAlD6E) and [Heifer AI](docId\:noM61wLBr2IbwGQEAlD6E) to learn more.

Expand the sections below to learn more:

::::ExpandableHeading{customAnchorSlug="PenGuidelines"}
## Guidelines for Working with Pens

- The pen numbers available in DairyComp vary based your current DairyComp cowfile version. Version 10 allows pen numbers 1-9999. Pen number "0" (zero) is typically used by DairyComp for record transfers. So, you should avoid using it as it may cause DairyComp to miss animals that need pregnancy checks.

  :::hint{type="warning"}
  <font color="#F97316">**IMPORTANT**</font>**:&#x20;**&#x49;f you have an older DairyComp cowfile version, please [Update DC305 to the Latest Release](docId\:ebEqSmCcwmOq-6dbM5X7v).
  :::
- Some users may have limited pen numbers available when using a DHI testing service.
- Pen types in DairyComp reflect an animal's reproductive or health status. You must select at least one pen type when adding or changing a pen. See [Learn about Pen Types](docId\:noM61wLBr2IbwGQEAlD6E)  for more information.
::::

:::::ExpandableHeading{customAnchorSlug="PenTypes"}
## Learn about Pen Types

In DairyComp, pen types, like AI, BULL, and DRY, are not just pen classifications. DairyComp records different data and performs various workflows depending on the pen's type. For example, if an animal is moved to a bull pen, DairyComp automatically enters the **BULLPEN** event into the cow's record (to document potential exposure to a bull) and adds her to the appropriate veterinary exam. &#x20;

Expand the pen types below to learn more about the processes that occur in DairyComp when animals are moved into in each pen type:

::::ExpandableHeading{customAnchorSlug="BULL-Pen"}
BULL &#x20;

When an animal is moved to a bull pen, DairyComp automatically enters the **BULLPEN** event into the cow's record (to document potential exposure to a bull) and adds her to the appropriate veterinary exam. An animal in a bull pen will have a heat date assigned to open animals. DairyComp also considers the cow bred on the date it is moved into the bullpen, so an open animal in a bull pen will always have a BRED repro status since she is exposed to a bull at all times while in the pen.

:::hint{type="warning"}
<font color="#F97316">**IMPORTANT\:**</font> A pen cannot be both an AI and a BULL at the same time.
:::
::::

::::ExpandableHeading{customAnchorSlug="AI-Pen"}
AI &#x20;

The AI pen type can be used for both cows and heifers that are ready for artificial insemination. When a heifer pen is designated as an AI pen, DairyComp can automatically set the AIDAT in the animal's record when it is first moved to that pen. You can map heifer AI to AIDAT within the **Advanced** drop-down list. See [Heifer AI ](docId\:noM61wLBr2IbwGQEAlD6E)to learn more.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/KBjjK_RW3wYcBT8eZzFw8_alter-pens-add-ai.png" size="32" width="1238" height="682" position="flex-start" darkWidth="1238" darkHeight="682" showCaption="false"}

:::hint{type="warning"}
<font color="#F97316">**IMPORTANT**</font>**:&#x20;**&#x41; pen cannot be both an AI and a BULL at the same time.
:::
::::

:::ExpandableHeading
MILK &#x20;

A milking pen is a specific pen type for lactating animals and should only be used for animals that are producing milk.
:::

:::ExpandableHeading
DRY &#x20;

Dry pens are used for closeup and dry animals. When an animal is dry and moved to a dry pen, DairyComp records the dry date (DDAT) in the animal's record. DairyComp warns you when a dry animal moves into a milking pen.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/6NwjPriELLWrHztMpuzxx_alter-pens-dry-warning.png" size="32" width="1675" height="677" position="flex-start" darkWidth="1675" darkHeight="677" showCaption="false"}
:::

:::ExpandableHeading
HOSP &#x20;

The Hospital pen is used for sick animals with special needs. When an animal is moved into a hospital pen, the hospital date (HPDAT) is recorded.
:::

:::ExpandableHeading
CALF &#x20;

Calf pens are used to identify youngstock. A calf pen can also be an AI pen when heifers are ready for artificial insemination.
:::

:::ExpandableHeading
USER &#x20;

The USER pen type allows you to create your own user‑defined pen type.
:::
:::::

:::ExpandableHeading{customAnchorSlug="AddPens"}
## Add a Pen

1. From the **Pens** drop-down menu, select **Add \[Ins]** to create a new pen.
2. Enter a new pen number between 1-9999. If you enter an existing pen number that is already in use, you'll edit the existing pen's details instead.
3. Click **OK** to open the pen details pop‑up window.

   ::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/QCN49eyBR2Xjrva8HbtAf_alter-pens-add.png" size="32" width="652" height="353" position="flex-start" darkWidth="652" darkHeight="353" showCaption="false"}
4. Define the pen details:
   - <font color="#67854E">**Pen type**</font>: Choose from a predefined list of types. Multiple types can be assigned to a pen. See [Learn about Pen Types](docId\:noM61wLBr2IbwGQEAlD6E) for more information about how animals in each pen type are processed.
   - <font color="#67854E">**Capacity**</font>: (Optional) Enter the total number of animals that the pen can hold. See [Set Up Pen Capacity](docId\:noM61wLBr2IbwGQEAlD6E) to learn more.
   - <font color="#67854E">**Label**</font>: (Optional) Enter an identifier for the pen that will help you easily identify the pen later.
:::

:::ExpandableHeading
## View or Change a Pen

Use the **Change** option or double-click a pen to preview a pen or change its details.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/RCayuojs_yGQ211s7mr8u_alter-pens-change.png" size="32" width="925" height="576" position="flex-start" darkWidth="925" darkHeight="576" showCaption="false"}

Make your edits, and then save your changes.
:::

:::ExpandableHeading
## Delete a Pen

Use the **Delete** option to remove a pen, but note that deleted pens cannot be recovered.

To delete a pen, select the pen, click **Delete \[Del]**, and confirm the deletion.
:::

:::ExpandableHeading
## Modify Multiple Pens

The **Change Multiple&#x20;**&#x6F;ption allows you to edit or delete multiple pens at once. Enter the pen numbers you want to edit, using commas to separate the numbers e.g. `1,2,3,4`. Click **OK**.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/iTac3f2pyq-sXOK036v11_pens-changemultiple.png" size="32" width="923" height="370" position="flex-start" darkWidth="923" darkHeight="370" showCaption="false"}

Respond to the prompts to delete or edit each pen. When you complete the last pen in your list, your changes are saved and the Pens List window closes.
:::

::::ExpandableHeading{customAnchorSlug="View"}
## View Pen Inventory

The Pen Inventory function provides a historical log of pen counts, allowing you to monitor occupancy trends in your dairy over time. DairyComp logs pen counts once daily, shortly after midnight, as long as DairyComp is running. If DairyComp is closed, the count is logged the next time the program starts.

:::hint{type="info"}
**NOTE:&#x20;**&#x50;en Inventory maintains up to two years of data; after that, older data is trimmed automatically.
:::

To use this function, select **Pen Inventory** from the Pens List window. The Pen Inventory window opens, showing the number of animals in each pen by date.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/171Wys-3HHxhFmqGK4prp_pen-inventory.png" size="32" width="1529" height="701" darkWidth="1529" darkHeight="701" position="flex-start" showCaption="false"}

Use the buttons at the top of the Pen Inventory window to change what is shown:

- <font color="#67854E">**Select Pens**</font>: Opens a checklist of all pens so you can choose which to display. You can select all, clear all, or filter by pen type (for example, AI or MILK). DairyComp remembers your last selection for convenience.


::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/qyUd7RFgBBLXBdNFrALd8_pen-inventoryselect-pens.png" size="32" width="544" height="639" darkWidth="544" darkHeight="639" position="flex-start" showCaption="false"}

- <font color="#67854E">**Select Dates**</font>: Lets you set the range of dates to display. You cannot select dates earlier than when your herd first began logging Pen Inventory data. The range of dates you select appear at the bottom of the Pen Inventory window.


::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/9BFLfbeK-uEQVttBy9IGP_pen-inventoryselect-dates.png" size="32" width="743" height="766" darkWidth="743" darkHeight="766" position="flex-start" showCaption="false"}

- <font color="#67854E">**Transpose Axes\:**</font> Switches the table orientation. By default, pens are columns and dates are rows. When transposed, dates become columns and pens are rows.
- <font color="#67854E">**Export to CSV\:**</font> Saves the displayed inventory data with a default name of `PenInventory.CSV`. You can keep that name or change it. If the file already exists the system will ask if you want to overwrite it.
::::

::::ExpandableHeading{customAnchorSlug="SetUpCapacity"}
## Set Up Pen Capacity

Pen capacity is the total number of animals that the pen can hold, and it is usually defined by the number of usable stalls or headlocks in the pen. Use the Pens List window to set up pen capacity:

1. Use the **Change** option or double-click a pen to preview a pen or change its details.

   ::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/RCayuojs_yGQ211s7mr8u_alter-pens-change.png" size="32" width="925" height="576" position="flex-start" darkWidth="925" darkHeight="576" showCaption="false"}
2. In the **Capacity** field, enter the total number of animals that the pen can hold and click **OK**.

   ::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/dP7TCjHQy-W9IjfDUqXcs_alter-pen-capacity.png" size="32" width="702" height="238" position="flex-start" darkWidth="702" darkHeight="238" showCaption="false"}

:::ExpandableHeading
**Use these commands to check pen capacity!**

- To see all the pens that have a set capacity, enter **ALTER\4P01** in the command line and click **OK**. In the results list, you can also see how full each pen currently is.
- To see all pens that are over 90% capacity, enter **ALTER\4P90** in the command line and click **OK**.
:::
::::

:::::ExpandableHeading{customAnchorSlug="MovePens"}
## Move an Entire Pen of Animals to a New Pen

::::hint{type="warning"}
<font color="#F97316">**IMPORTANT**</font>**:&#x20;**&#x42;efore you move all animals from one pen into another, we highly recommend that you complete the precautionary steps below.

:::ExpandableHeading
**Complete These Steps before Proceeding!**

1. Save a backup using the **SAVE\F** command.
2. Confirm that the new pen is empty by entering **ALTER\4** in the command line, and then verify that the new pen's **Count** is "0" in the Pens List window.

   ::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/cs8qhnz9_DYUUhRig_USH_alter-pen-empty.png" size="40" width="800" height="576" darkWidth="800" darkHeight="576" position="flex-start" showCaption="false"}
3. Ensure that you have the correct pen number for your current pen. Enter **SHOW ID  PEN** **RPRO FOR PEN = (current number)** in the command line to verify that the current pen's list of animals matches the list of animals you want to move.
:::
::::

To move an entire pen of animals into a new pen, enter **PEN=(new pen number) FOR** **PEN=(current pen number)** in the command line.

For example, if you want to move all the animals from pen number 1 to pen number 2, enter **PEN=1 FOR** **PEN=2&#x20;**&#x69;n the command line.
:::::

:::::ExpandableHeading{customAnchorSlug="Advanced"}
## Advanced Pen Options

Expand the sections below to learn more:

::::ExpandableHeading{customAnchorSlug="Advanced-HeiferAI"}
### Heifer AI

You can use the advanced **Heifer AI** option to document when a heifer enters an AI pen. The option can be found in the **Advanced** drop-down list on the left side of the window. When selected, DairyComp provides a picklist of items to choose from so you can define the date when a heifer first entered an AI pen. See [AIPen](docId\:noM61wLBr2IbwGQEAlD6E) to learn more.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/KBjjK_RW3wYcBT8eZzFw8_alter-pens-add-ai.png" size="32" width="1238" height="682" position="flex-start" darkWidth="1238" darkHeight="682" showCaption="false"}

:::hint{type="info"}
**NOTE:&#x20;**&#x54;he **AIDAT** (type 18) item is the preferred date item mapping for heifer movement into AI pens. See [ALTER2 : Item DefinitionsALTER2 : Item Definitions](docId\:ELH0_Fj-KTf5ihC3RhfIG) to learn more about configuring items in DairyComp.
:::
::::

::::ExpandableHeading{customAnchorSlug="Advanced-PenChange"}
### Pen Change

In the **Advanced** drop-down list on the left side of the window, use the **Pen Change** option to map which date or event items should be automatically recorded when animals move between pens.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/6CWCIMC0tH2AqdKEVJJfE_alter-pens-penchange.png" size="32" width="1295" height="737" position="flex-start" darkWidth="1295" darkHeight="737" showCaption="false"}

:::hint{type="info"}
**NOTE:&#x20;**&#x54;he **MVDAT** (type 18) item is the preferred date item mapping for animal movement between pens. See [ALTER2 : Item DefinitionsALTER2 : Item Definitions](docId\:ELH0_Fj-KTf5ihC3RhfIG) to learn more about configuring items in DairyComp.
:::
::::
:::::

:::ExpandableHeading{customAnchorSlug="Tools"}
## Find, Print, and Export Pen Definitions

These options are found within the **Tools** drop-down list at the bottom right side of the Pens List window.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/lXW9GVAIpa-UEKDcGMGFe_alter-items-tools.png" size="26" width="792" height="350" position="flex-start" darkWidth="792" darkHeight="350" showCaption="false"}

The system displays the numbers, names, types, animal counts, and descriptions of all pens in the current table. You can either print the list from the browser or export the information to a file.

To find a specific pen, click the **Find** option or press the **\[F9]** button on your keyboard. Enter the desired pen into the search bar. The system will automatically locate the pen as you type.
:::

