Created On:  25 April 2011

Problem:

When using the StarTeam Bulk Checkout Utility (BCO) for build scripting, the error code provided by the utility can be useful in directing the flow of the script. For example, when preventing a build whenever the checkout has failed.

Resolution:

The Bulk Checkout Utility returns the following error codes,
  • 0     - Success
  • 1     - Connection or other major error
  • 101 - Some filename patterns were not matched
  • 102 - No filename patterns were matched

The error code can be added to script logic, for example:

IF ERRORLEVEL EQ 0 GOTO Build ELSE GOTO NoBuild

The above logic allows the build to continue only if all files have been checked out successfully without errors.