I run the perl code below.
$retCode = ClearCase($cmd);
Works with no error, but it returns 65280 when I run this:
$retCode = ClearCase($logcmd);
I tried on XP and Windows 2003 server, same result, all with ActiveState Perl v5.14.2.
This code was working 2 years ago somewhere else.
$g_HPPC_DEV_DRIVE = "M";
$g_HPPC_DEV_VIEW = "bldforge_AOMS_DEV";
$g_logfile = "logfile.txt";
$cmd = "startview $g_HPPC_DEV_VIEW";
$logcmd = $cmd . " >> $g_logfile 2>>&1";
$targetDir = $g_HPPC_DEV_DRIVE . ":\\" . $g_HPPC_DEV_VIEW;
print "\$targetDir = $targetDir\n";
print "Starting view .......\n";
#$retCode = system("cleartool startview bldforge_AOMS_DEV >> logfile.txt");
#$retCode = `cleartool startview bldforge_AOMS_DEV`;
$retCode = ClearCase($logcmd);
#$retCode = ClearCase($cmd);
sub ClearCase
{
my $retCode = 0;
my $args = $_[0];
my $cmd = "cleartool " . $args;
$retCode = Execute($cmd);
return $retCode;
}
sub Execute
{
my $retCode = 0;
my $cmd = $_[0];
if ($g_HPPC_BUILD_SIMULATION ne "Y")
{
print("Execute() Running...: $cmd\n");
$retCode = system($cmd);
#$retOut = `$cmd`;
#$retCode = $?;
#print("Command execute output: $retOut\n");
}
else
{
print("Execute() *** SIMULATION: $cmd\n");
}
print("Execute() retCode = $retCode, $cmd\n");
return $retCode;
}
What is the meaning of this 65280 exit code?
When using cleartool, it is best to ensure using
ccperl(now calledratlperl), the perl packaged with ClearCase, instead of the very latest Active Perl (which actually is the 5.14.2).So instead of launching your perl script by default, picking up the first
perl.exeavailable in your%PATH%, try calling it with one of the perl included with ClearCase:ratlperl: inC:\Program Files\Rational\Common.ccperl: inC:\Program Files\Rational\ClearCase\bin.And see if the error persists.
The root cause was a
PATHissue: severalperlwere available:By making sure the
PATHonly reference oneperl(the one shipped with ClearCase), the script could be launched successfully.