Modified report procedure

Here is the modified version of Elements_Created_by_User.prl.

$start_dir = $0; $start_dir =~ s/\\scripts\\.*/\\scripts/;
$common_dir = $start_dir;
$common_dir =~ s/(.*)\\scripts/$1\\script_tools/;

$cc = ""; if ($cc) {;};
$ct = ""; if ($ct) {;};
$debug = ""; if ($debug) {;};
$skip_path_checks = ""; if ($skip_path_checks) {;};
$CLEARCASE_XN_SFX = ""; if ($CLEARCASE_XN_SFX) {;};
$ctfind_paths = ""; if ($ctfind_paths) {;};
$skip_path_checks = "yes"; if ($skip_path_checks) {;};
$debug = "no"; if ($debug) {;};

sub do_exit {
   $err = join(" ", @_);
   if ("$err" != "") {
   print STDERR "$err\n";
   }
   sleep(2);
   if ("$err" != "") {
      exit(1);
   } else {
   exit(0);
   }
}
open(INCLUDE, "<$common_dir\\common_script.prl") or do_exit("error 
opening include file '$common_dir\\common.prl'"); 
$buf = "";
while(<INCLUDE>) {
   $buf = $buf . $_;
}
close(INCLUDE);
eval $buf || do_exit("error on eval of include file 
'$common_dir\\common.prl'"); 

my $args = $ARGV[0];
$args =~ s/
@args = split(";", $args);
my $ccuser = "";
$required_args = 0;
foreach(@args) {

   s/^[    ]+//;
   s/[    ]+$//;
   validate_arg_length($_);
   if (/^-i/) {
### customization change *** changed following line
      print "description : 'Elements With Group'\n";
      print "id : 2016\n";
      print "helpfile :\n";
      print "parameters : ";
### customization change *** changed following line
         print "LOOKIN GROUP";
      print "\n";
      print_element_rightclick();
      print "fields : ";
         print "\"Element Path\"(element_xpn, sort 2, rightclick) ";
### customization change *** added following 2 lines
         print "\"Element's Group\"(group, sort 1) ";
         print "\"Same\"(yes_no) ";
### customization change *** deleted following line
         #print "\"Creating User\"(user, sort 1) ";
      print "\n";
   exit(0);
}
if (/^LOOKIN[    ]*=[    ]*('.*')/) {
   check_lookin($1);
   $required_args++;
   next;
}
### customization change *** deleted following 2 lines
   #if (/^USER[    ]*=[\t   ]*\"*([^\"]*)\"*/) {
      #$ccuser = $1;
### customization change *** added following 2 lines
if (/^GROUP[    ]*=[\t   ]*\"*([^\"]*)\"*/)  {
   $ccgroup = $1;
   $required_args++;
### customization change *** deleted following line
   #validate_user($ccuser);
   next;
}
print STDERR "unrecognized argument: $_\n";
print STDERR "  ccperl $0 -i\n";
print STDERR "    for script's interface.\n";
do_exit("\n");
}
if ($required_args != 2) {
   print STDERR "usage: not all required arguments specified.\n";
   print STDERR "  ccperl $0 -i\n";
   print STDERR "    for script's interface.\n";
   do_exit("\n");
}
### customization change *** deleted following 3 lines
#if ($ccuser =~ /[ ]+/) {
#     do_clearprompt("cleartool find does not allow spaces in user names;
#   cannot proceed.");
#}

### customization change *** changed following line
open(CTFIND, "cleartool find $ctfind_paths -nxname -print |");
while(<CTFIND>) {
   chomp;
### customization change *** added following 6 lines
   $grp = 'cleartool desc -fmt ';
   if ($grp eq $ccgroup) {
      $same = "yes";
      } else {
      $same = "no";
   }
### customization change *** changed following line
   print "$_;$grp;$same\n";
   #print "$_;$ccuser;\n";
}
do_exit();