Troubleshooting
Problem
This technote explains why an IBM® Rational® ClearCase® []cleartool[] command that uses a variable works fine from the command line but generates various syntax errors when run from a batch file on Microsoft® Windows®.
Symptom
Cleartool commands that use variables fail when run from a batch file on Windows. The very same command functions properly when run outside of the batch file from a command prompt.
Example 1:
cleartool find . -type f -exec "cleartool co -nc %CLEARCASE_PN%" -print
The command runs fine by itself from the command line but you get the following error when you try to run it from a batch file:
cleartool: Error: Element pathname required.
Usage: checkout | co [-reserved] [-unreserved [-nmaster]]
[-out dest-pname | -ndata] [-ptime]
[-branch branch-pname | -version] [-nwarn]
[-c comment | -cfile pname | -cq | -cqe | -nc]
[-query | -nquery] pname ...
.\test2.h@@
Example 2:
cleartool find . -nxn -vers "created_since(yesterday)" -exec "cleartool desc -fmt %u\t%c %CLEARCASE_XPN%" -print
cleartool: Error: Bad command line: unterminated quoted string
cleartool: Error: Can't exec "(null)": The operation completed successfully.
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
29 September 2018
UID
swg21149187