Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6719483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:05:54+00:00 2026-05-26T09:05:54+00:00

I am writing some command.com scripts to automate some tasks involving ClearCase views. I

  • 0

I am writing some command.com scripts to automate some tasks involving ClearCase views. I can use cleartool lsview viewname to determine if the view exists or not. How can I get the output from the lsview subcommand into a variable such that the script does not get terminated by a cleartool error when the view does not exist?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:05:55+00:00Added an answer on May 26, 2026 at 9:05 am

    If you have a recent enough ClearCase (7.1.x), you can also use:

    cleartool lsview -quick -host <registryServer>|find "viewname"
    

    (replace <registryServer> by your ClearCase registry server name)
    In a DOS script, you would redirect that to a file, and then affect the content of said file to a variable:

    set VAR=""
    cleartool lsview -quick -host <registryServer>|find "viewname" > c:\temp\aview
    IF %ERRORLEVEL% NEQ 0 goto noset
    set /p VAR=<c:\temp\aview
    :noset
    

    You can put a condition on setting that VAR with ERRORLEVEL (test done just after the cleartool command).
    The advantage is that the cleartool command doesn’t generate any error message, even if the view doesn’t exist.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some db utility scripts, and one of the tasks I need to
I'm writing some Ruby scripts to wrap AWS ELB command line calls, mostly so
I'm writing a script to automate some command line commands in Python. At the
I've writing some Exchange 2010 Unified Messaging automation scripts. I'm trying to automate the
I'm writing some tests for a C++ command line Linux app. I'd like to
I'm writing some code that uses dynamic shared libraries as plugins. My command line
I'm writing a program in C++ and it takes some command line arguments. The
I'm writing a ruby program that executes some external command-line utilities. How could I
I have some pyunit unit tests for a simple command line programme I'm writing.
Writing some test scripts in IronPython, I want to verify whether a window is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.