Index: /trunk/dbconfig/publish.md
===================================================================
--- /trunk/dbconfig/publish.md	(revision 29961)
+++ /trunk/dbconfig/publish.md	(revision 29962)
@@ -9,4 +9,6 @@
     workdir      STR         255
     comment      STR         255
+    name	 STR	     64
+    output_format S16	     0
 END              
                  
Index: /trunk/ippScripts/scripts/publish_file.pl
===================================================================
--- /trunk/ippScripts/scripts/publish_file.pl	(revision 29961)
+++ /trunk/ippScripts/scripts/publish_file.pl	(revision 29962)
@@ -44,4 +44,5 @@
 my ( $pub_id, $camera, $stage, $stage_id, $fileset, $format, $product, $workdir );
 my ( $dbname, $verbose, $no_update, $no_op, $save_temps, $redirect );
+my ( $output_format );
 
 GetOptions(
@@ -59,4 +60,5 @@
     'save-temps'        => \$save_temps, # Save temporary files?
     'redirect-output'   => \$redirect,   # Redirect output to log file?
+    'output_format'        => \$output_format, # Output format for ppMops
     ) or pod2usage( 2 );
 
@@ -335,4 +337,5 @@
     $command .= " -zp_error " . $data->{zp_err} if defined $data->{zp_err};
     $command .= " -astrom_rms " . $data->{astrom} if defined $data->{astrom};
+    $command .= " -version " . $data->{output_format} if defined $data->{output_format};
 
     unless ($no_op) {
Index: /trunk/ippTasks/publish.pro
===================================================================
--- /trunk/ippTasks/publish.pro	(revision 29961)
+++ /trunk/ippTasks/publish.pro	(revision 29962)
@@ -130,4 +130,5 @@
     book getword publishRun $pageName stage_id -var STAGE_ID
     book getword publishRun $pageName dbname -var DBNAME
+    book getword publishRun $pageName output_format -var OUTPUT_FORMAT
 
     stdout $LOGDIR/publish.run.log
@@ -137,5 +138,5 @@
     strsub $WORKDIR_TEMPLATE @HOST@ $default_host -var WORKDIR
 
-    $run = publish_file.pl --pub_id $PUB_ID --camera $CAMERA --workdir $WORKDIR --product $PRODUCT --stage $STAGE --stage_id $STAGE_ID --redirect-output
+    $run = publish_file.pl --pub_id $PUB_ID --camera $CAMERA --workdir $WORKDIR --product $PRODUCT --stage $STAGE --stage_id $STAGE_ID --output_format $OUTPUT_FORMAT --redirect-output
     add_standard_args run
 
Index: /trunk/ippTools/share/pubtool_definerun.sql
===================================================================
--- /trunk/ippTools/share/pubtool_definerun.sql	(revision 29961)
+++ /trunk/ippTools/share/pubtool_definerun.sql	(revision 29962)
@@ -3,5 +3,6 @@
     client_id,
     stage_id,
-    src_label
+    src_label,
+    output_format
 FROM (
     -- Get diffs to publish
@@ -9,5 +10,6 @@
         client_id,
         diff_id AS stage_id,
-        diffRun.label AS src_label
+        diffRun.label AS src_label,
+	output_format
     FROM publishClient
     JOIN diffRun
@@ -28,5 +30,6 @@
         client_id,
         cam_id AS stage_id,
-        camRun.label AS src_label
+        camRun.label AS src_label,
+	output_format
     FROM publishClient
     JOIN camRun
@@ -43,5 +46,6 @@
         client_id,
         diff_phot_id AS stage_id,
-        diffPhotRun.label AS src_label
+        diffPhotRun.label AS src_label,
+	output_format
     FROM publishClient
     JOIN diffPhotRun
Index: /trunk/ippTools/share/pubtool_pending.sql
===================================================================
--- /trunk/ippTools/share/pubtool_pending.sql	(revision 29961)
+++ /trunk/ippTools/share/pubtool_pending.sql	(revision 29962)
@@ -9,4 +9,5 @@
         publishClient.stage,
         publishClient.workdir,
+	publishClient.output_format,
         diffRun.diff_id AS stage_id,
         rawExp.camera,
@@ -35,4 +36,5 @@
         publishClient.stage,
         publishClient.workdir,
+	publishClient.output_format,
         camRun.cam_id AS stage_id,
         rawExp.camera,
@@ -56,4 +58,5 @@
         publishClient.stage,
         publishClient.workdir,
+	publishClient.output_format,
         diffPhotRun.diff_phot_id AS stage_id,
         rawExp.camera,
Index: /trunk/ippTools/share/pxadmin_create_tables.sql
===================================================================
--- /trunk/ippTools/share/pxadmin_create_tables.sql	(revision 29961)
+++ /trunk/ippTools/share/pxadmin_create_tables.sql	(revision 29962)
@@ -1643,5 +1643,8 @@
     workdir VARCHAR(255) NOT NULL, -- working directory
     comment VARCHAR(255),            -- for human memory
-    PRIMARY KEY(client_id)
+    name varchar(64) default NULL, -- unique client_id verbose identifier
+    output_format SMALLINT NOT NULL default 1, -- format output versioning
+    PRIMARY KEY(client_id),
+    UNIQUE KEY name (name)
 ) ENGINE=innodb DEFAULT CHARSET=latin1;
 
Index: /trunk/ippTools/src/pubtool.c
===================================================================
--- /trunk/ippTools/src/pubtool.c	(revision 29961)
+++ /trunk/ippTools/src/pubtool.c	(revision 29962)
@@ -96,6 +96,8 @@
     PXOPT_LOOKUP_STR(comment, config->args, "-comment",  false, false);
     PXOPT_LOOKUP_BOOL(unmagicked, config->args, "-unmagicked",  false);
-
-    if (!publishClientInsert(config->dbh, 0, 0, product, stage, !unmagicked, workdir, comment)) {
+    PXOPT_LOOKUP_STR(name, config->args, "-name",  false, false);
+    PXOPT_LOOKUP_S16(output_format, config->args, "-output_format",  false, false);
+
+    if (!publishClientInsert(config->dbh, 0, 0, product, stage, !unmagicked, workdir, comment, name, output_format)) {
         psError(PS_ERR_UNKNOWN, false, "Database error");
         return false;
@@ -313,4 +315,5 @@
     PXOPT_COPY_STR(config->args, where, "-stage", "publishClient.stage", "==");
     PXOPT_COPY_STR(config->args, where, "-comment", "publishClient.comment", "LIKE");
+    PXOPT_COPY_STR(config->args, where, "-name", "publishClient.name", "LIKE");
     pxAddLabelSearchArgs(config, where, "-label", "publishRun.label", "==");
 
Index: /trunk/ippTools/src/pubtoolConfig.c
===================================================================
--- /trunk/ippTools/src/pubtoolConfig.c	(revision 29961)
+++ /trunk/ippTools/src/pubtoolConfig.c	(revision 29962)
@@ -83,4 +83,5 @@
     psMetadataAddBool(pendingArgs, PS_LIST_TAIL, "-simple",  0, "use simple output format?", false);
     psMetadataAddU64(pendingArgs, PS_LIST_TAIL, "-limit",  0, "limit result set", 0);
+    psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-name", 0, "search on client name", NULL);
 
     // -add
