Perl
use English;
unshift( @INC,
"/net/solarisHost/opt/hcl/common/lib/perl5/site_perl/5.6.1/sun4-solaris-mul
ti/ClearCase" );
require ("CtCmd.pm");
my $ccinst = ClearCase::CtCmd->new();
my $result;
# get parent stream and stream type of an activity
my $status;
my $stream;
my $istream;
my $str_type;
my $project;
($status, $stream) =
$ccinst->exec("des","-fmt","%[stream]p","activity:MCK00000031\@/var/tmp/beth
_pvob");
print( "Status: " . $status . "\n" );
($status, $project) =
$ccinst->exec("des","-fmt","%[project]p","stream:$stream\@/var/tmp/beth_pvob
");
print( "Status: " . $status . "\n" );
($status, $istream) = $ccinst->exec("des","-fmt","%[istream]p",
"project:$project\@/var/tmp/beth_pvob");
print( "Status: " . $status . "\n" );
print( "Activity: MCK00000031\nStream: " . $stream . "\nProject: " .
$project . "\nIntegration Stream: " . $istream . "\n" );
# find out if stream is integration stream
if ( $stream !~ $istream ) {
$result = "Current stream is not the integration stream";
}
else {
$result = "Current stream is the integration stream";
}
print($result);