Modified report procedure

Here is the modified version of Versions_by_Date.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);
$required_args = 0;
foreach(@args) {

   s/^[    ]+//;
   s/[    ]+$//;
   validate_arg_length($_);
   if (/^-i/) {
      print "description : 'Versions by Date'\n";
      print "id : 2018\n";
      print "helpfile :\n";
      print "parameters : ";
      print "LOOKIN ";
      print "\n";
      print_version_rightclick();
      print "fields : ";
         print "\"Version Path\"(version_xpn, rightclick, sort 2) ";
         print "\"Version Creation Time\"(cctime) ";
         print "\"Version Creation Time\"(time_t, sort 1, hidden) ";
### customization change *** added following line
         print "\"User'(user) ";
      print "\n";
      exit(0);
}
if (/^LOOKIN[    ]*=[    ]*('.*')/) {
   check_lookin($1);
   $required_args++;
   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 != 1) {
   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");
}
$ENV{"d;"} = "äd;ä";
open(CTHIST, "cleartool lshist -fmt '%n\\n' -recurse -nco 
$ctfind_paths |");
while(<CTHIST>) {
   chomp;
   if (/create directory version/ || /create version/) {
      ($date, $event, $xpn) = split  /;/, $_, 3;
      if ($date) {;}
      if ($event) {;}
      if ($xpn) {;}
      $timet = time_to_ticks($date);
### customization change *** added following line
      $user = 'cleartool desc -fmt ';
### customization change *** added ";$user" to following line
      print "$xpn;$date;$timet;$user\n";
   }
}
do_exit();