Index: /trunk/ippScripts/scripts/dist_make_fileset.pl
===================================================================
--- /trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 25566)
+++ /trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 25567)
@@ -39,5 +39,5 @@
 
 # Parse the command-line arguments
-my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $prod_id, $product_name, $ds_dbhost, $ds_dbname);
+my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $dest_id, $product_name, $ds_dbhost, $ds_dbname);
 my ($dbname, $save_temps, $verbose, $no_update, $logfile);
 
@@ -48,5 +48,5 @@
            'stage=s'        => \$stage,      # raw, chip, camera, fake, warp, stack, or diff
            'stage_id=s'     => \$stage_id,   # exp_id, chip_id, etc.
-           'prod_id=s'      => \$prod_id,    # id for the product
+           'dest_id=s'      => \$dest_id,    # id for the product
            'product_name=s' => \$product_name,  # location of the data store directory for this product
            'ds_dbhost=s'    => \$ds_dbhost,  # database host for the datastore database
@@ -60,5 +60,5 @@
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --prod_id --ds_dbhost --ds_dbname",
+pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --dest_id --ds_dbhost --ds_dbname",
            -exitval => 3) unless
     defined $dist_id and
@@ -67,5 +67,5 @@
     defined $stage and
     defined $stage_id and
-    defined $prod_id and
+    defined $dest_id and
     defined $product_name and
     defined $ds_dbhost and
@@ -79,7 +79,8 @@
 my $fs_tag = get_fileset_tag($ipprc, $stage, $stage_id, $dbname);
 
-&my_die("failed to lookup fileset tag", $dist_id, $prod_id, $PS_EXIT_UNKNOWN_ERROR) if !defined $fs_tag;
-
-my $fileset_name = "$fs_tag$stage.$stage_id.$dist_id.$prod_id";
+&my_die("failed to lookup fileset tag", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR) if !defined $fs_tag;
+
+my $fileset_name = $fs_tag ? "$fs_tag." : "";
+$fileset_name .= "$stage.$stage_id.$dist_id.$dest_id";
 
 print "$fileset_name\n";
@@ -89,5 +90,5 @@
 my $dbinfo_file = "dbinfo.$stage.$stage_id.mdc";
 if (! -e "$dist_dir/$dbinfo_file" ) {
-    &my_die("dbinfo file for dist run $dbinfo_file not found", $dist_id, $prod_id, $PS_EXIT_UNKNOWN_ERROR);
+    &my_die("dbinfo file for dist run $dbinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR);
 }
 print "dbinfo file $dbinfo_file exists\n" if $verbose;
@@ -96,5 +97,5 @@
 my $dirinfo_file = "dirinfo.$stage.$stage_id.mdc";
 if (! -e "$dist_dir/$dirinfo_file" ) {
-    &my_die("dirinfo file for dist run $dirinfo_file not found", $dist_id, $prod_id, $PS_EXIT_UNKNOWN_ERROR);
+    &my_die("dirinfo file for dist run $dirinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR);
 }
 print "dirinfo file $dirinfo_file exists\n" if $verbose;
@@ -116,9 +117,9 @@
     unless ($success) {
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $prod_id, $error_code);
+        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code);
     }
 
     my $metadata = $mdcParser->parse (join "", @$stdout_buf) or
-        &my_die("Unable to parse metadata config doc", $dist_id, $prod_id, $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to parse metadata config doc", $dist_id, $dest_id, $PS_EXIT_PROG_ERROR);
 
     $components = parse_md_list($metadata);
@@ -153,5 +154,7 @@
 
     # set the product specific columns in product list
-    $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $fs_tag";
+    my $prod_col_3 = $fs_tag ? $fs_tag : "$stage.$stage_id";
+
+    $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $prod_col_3";
 
     $command .= " --dbname $ds_dbname";    # XXX: notyet --dbhost $ds_dbhost
@@ -161,10 +164,10 @@
     unless ($success) {
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $prod_id, $error_code);
+         &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code);
     }
 }
 
 {
-    my $command = "$disttool -addfileset -dist_id $dist_id -prod_id $prod_id -name $fileset_name";
+    my $command = "$disttool -addfileset -dist_id $dist_id -dest_id $dest_id -name $fileset_name";
     $command .= " -dbname $dbname" if $dbname;
 
@@ -175,5 +178,5 @@
         # We need to have revertfileset check whether the fileset exists and do dsreg -del if it does
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $prod_id, $error_code);
+        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code);
     }
 }
@@ -252,11 +255,11 @@
     my $msg = shift;
     my $dist_id = shift;
-    my $prod_id = shift;
+    my $dest_id = shift;
     my $fault = shift;
 
-    # TODO: disttool -adddsfileset -prod_id $prod_id -dist_id $dist_id -fault $fault
+    # TODO: disttool -adddsfileset -dest_id $dest_id -dist_id $dist_id -fault $fault
     print STDERR "$msg\n";
 
-    my $command = "$disttool -addfileset -dist_id $dist_id -prod_id $prod_id -fault $fault";
+    my $command = "$disttool -addfileset -dist_id $dist_id -dest_id $dest_id -fault $fault";
     $command .= " -dbname $dbname" if $dbname;
 
Index: /trunk/ippScripts/scripts/rcserver_checkstatus.pl
===================================================================
--- /trunk/ippScripts/scripts/rcserver_checkstatus.pl	(revision 25566)
+++ /trunk/ippScripts/scripts/rcserver_checkstatus.pl	(revision 25567)
@@ -40,10 +40,9 @@
 
 # Parse the command-line arguments
-my ($dest_id, $prod_id, $status_uri, $last_fileset, $limit);
+my ($dest_id, $status_uri, $last_fileset, $limit);
 my ($dbname, $save_temps, $verbose, $no_update, $logfile);
 
 GetOptions(
            'dest_id=s'      => \$dest_id,    # destination identifier
-           'prod_id=s'      => \$prod_id,    # product identifier
            'status_uri=s'   => \$status_uri, # uri for the desination's status data store product
            'last_fileset=s' => \$last_fileset, # name of last fileset seen on this datastore
Index: /trunk/ippTasks/rcserver.pro
===================================================================
--- /trunk/ippTasks/rcserver.pro	(revision 25566)
+++ /trunk/ippTasks/rcserver.pro	(revision 25567)
@@ -4,5 +4,5 @@
 check.globals
 
-#$LOGSUBDIR = $LOGDIR/rcserver
+$LOGSUBDIR = $LOGDIR/rcserver
 mkdir $LOGSUBDIR
 
@@ -66,5 +66,5 @@
 
   stdout NULL
-  stderr $LOGDIR/rcserver.makefileset.load.log
+  stderr $LOGSUBDIR/rcserver.makefileset.load.log
 
   task.exec
@@ -86,5 +86,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout rcPendingFS -key dist_id:prod_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    ipptool2book stdout rcPendingFS -key dist_id:dest_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook rcPendingFS
@@ -131,5 +131,5 @@
     book getword rcPendingFS $pageName dist_dir -var DIST_DIR
 #    book getword rcPendingFS $pageName clean -var CLEAN
-    book getword rcPendingFS $pageName prod_id -var PROD_ID
+    book getword rcPendingFS $pageName dest_id -var DEST_ID
     book getword rcPendingFS $pageName product_name -var PRODUCT_NAME
     book getword rcPendingFS $pageName ds_dbhost -var DS_DBHOST
@@ -141,5 +141,5 @@
     host anyhost
 
-    sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $PROD_ID
+    sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $DEST_ID
     stdout $logfile
     stderr $logfile
@@ -147,5 +147,5 @@
     book setword rcPendingFS $pageName pantaskState RUN
 
-    $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --prod_id $PROD_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR
+    $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --dest_id $DEST_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR
 
     add_standard_args run
@@ -184,5 +184,5 @@
 
   stdout NULL
-  stderr $LOGDIR/rcserver.checkstatus.load.log
+  stderr $LOGSUBDIR/rcserver.checkstatus.load.log
 
   task.exec
@@ -241,9 +241,9 @@
 
     stdout NULL
-    stderr $LOGDIR/rcserver.checkstatus.run.log
+    stderr $LOGSUBDIR/rcserver.checkstatus.run.log
 
     book setword rcPendingDest $pageName pantaskState RUN
     book getword rcPendingDest $pageName dest_id -var DEST_ID
-    book getword rcPendingDest $pageName prod_id -var PROD_ID
+    book getword rcPendingDest $pageName dest_id -var DEST_ID
     book getword rcPendingDest $pageName status_uri -var STATUS_URI
     book getword rcPendingDest $pageName last_fileset -var LAST_FILESET
@@ -252,5 +252,5 @@
     host anyhost
 
-    $run = rcserver_checkstatus.pl --dest_id $DEST_ID --prod_id $PROD_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET
+    $run = rcserver_checkstatus.pl --dest_id $DEST_ID --dest_id $DEST_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET
     add_standard_args run
 
Index: /trunk/ippTools/share/disttool_pendingfileset.sql
===================================================================
--- /trunk/ippTools/share/disttool_pendingfileset.sql	(revision 25566)
+++ /trunk/ippTools/share/disttool_pendingfileset.sql	(revision 25567)
@@ -6,5 +6,5 @@
     CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as dist_dir,
     rcDestination.name AS product_name,
-    rcDestination.prod_id,
+    rcDestination.dest_id,
     rcDestination.dbname AS ds_dbname,
     rcDestination.dbhost AS ds_dbhost
Index: /trunk/ippTools/src/disttool.c
===================================================================
--- /trunk/ippTools/src/disttool.c	(revision 25566)
+++ /trunk/ippTools/src/disttool.c	(revision 25567)
@@ -903,5 +903,5 @@
     // required values
     PXOPT_LOOKUP_S64(dist_id, config->args, "-dist_id", true, false);
-    PXOPT_LOOKUP_S64(prod_id, config->args, "-prod_id", true, false);
+    PXOPT_LOOKUP_S64(dest_id, config->args, "-dest_id", true, false);
 
     PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
@@ -913,5 +913,5 @@
             0,          // fs_id
             dist_id,
-            prod_id,
+            dest_id,
             name,
             "full",
@@ -928,5 +928,5 @@
     PXOPT_COPY_S64(config->args, where, "-fs_id", "fs_id", "==");
     PXOPT_COPY_S64(config->args, where, "-dist_id", "rcDSFileset.dist_id", "==");
-    PXOPT_COPY_S64(config->args, where, "-prod_id", "prod_id", "==");
+    PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "==");
     PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");;
     PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "==");
@@ -1056,5 +1056,4 @@
     PXOPT_COPY_S64(config->args, where, "-dist_id",  "dist_id", "==");
     PXOPT_COPY_S64(config->args, where, "-dest_id",  "dest_id", "==");
-    PXOPT_COPY_S64(config->args, where, "-prod_id",  "prod_id", "==");
     PXOPT_COPY_S64(config->args, where, "-target_id","target_id", "==");
     PXOPT_COPY_S64(config->args, where, "-fs_id",    "fs_id", "==");
@@ -1455,5 +1454,4 @@
     psMetadata *where = psMetadataAlloc();
     PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "==");
-    PXOPT_COPY_S64(config->args, where, "-prod_id", "prod_id", "==");
 
     PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
@@ -1477,5 +1475,5 @@
     // last_fileset normally gets set by updatercrunMode
     // Allowing it to be set here might cause problems
-    // especially since we are allowing selection by prod_id
+    // especially since we are allowing selection by dest_id
     if (last_fileset) {
         psStringAppend(&query, " %s last_fileset = '%s'", sep, last_fileset);
Index: /trunk/ippTools/src/disttoolConfig.c
===================================================================
--- /trunk/ippTools/src/disttoolConfig.c	(revision 25566)
+++ /trunk/ippTools/src/disttoolConfig.c	(revision 25567)
@@ -146,5 +146,5 @@
     psMetadata *addfilesetArgs = psMetadataAlloc();
     psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0);
-    psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "-prod_id", 0, "define prod_id", 0);
+    psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "-dest_id", 0, "define dest_id", 0);
     psMetadataAddStr(addfilesetArgs, PS_LIST_TAIL, "-name",    0, "define file name", NULL);
     psMetadataAddS32(addfilesetArgs, PS_LIST_TAIL, "-fault",   0, "define fault code", 0);
@@ -161,5 +161,5 @@
     psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-fs_id",   0, "define fs_id", 0);
     psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0);
-    psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-prod_id", 0, "define dist_id", 0);
+    psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-dest_id", 0, "define dist_id", 0);
     psMetadataAddStr(revertfilesetArgs, PS_LIST_TAIL, "-stage",   0, "define stage", NULL);
     psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-stage_id",0, "define stage_id", 0);
@@ -173,5 +173,4 @@
     psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-dist_id",   0, "define dist_id", 0);
     psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-dest_id",   0, "define dest_id", 0);
-    psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-prod_id",   0, "define prod_id", 0);
     psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-target_id", 0, "define target_id", 0);
     psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-fs_id",     0, "define fs_id", 0);
