Table of Contents

Renaming Volume-ID's Using A Batch File

Renaming a batch of Volumes can be completed in one process using a configuration file, definition file, Volume List and TMSS10VolumeRename.

When TMSS10VolumeRename is executed, the configuration file will use the definition file to load the Volumes into a scan list.

Volumes from the target Customer are then compared to the Scan list and either processed (if in the Scan list) or discarded (if not in the Scan list)

The Volumes processed are then renamed according to the logic in the Command Line code.

Example Files

Adding L5 suffix to all Volumes in the input file volumes.txt for Customer US04, Media LTO.

Volume Input File

volumes.txt

100001
100002
100003
100004
100005
100006
100007
100008
100009
100010

Definition File

rename.ttidef

# Set volume input file 
SetFile("volumes.txt");

# Set Customer and Media values
SetLiteral(CUSTOMER, US04);
SetLiteral(MEDIA, LTO);

# Extract barcode
Extract(BARCODE, 0, 6, 0);

Configuration File

rename.cfg

Compare all Volumes to Scan file.

If present in the Scan file (scanfile=true) then process that Volume (skip=false)

If not present in the Scan file discard Volume (skip=true)

traversal =
{
   scanfile= { file="rename.ttidef"; };
   customer =
   (
      {
         id="*";
         media =
         (
            {
               id="*";
               volume =
               (
                   {
                      id="*";
                      scanfile=true;
                      skip=false;
                   },
                   {
                      id="*";
                      skip=true;
                   }
               );
            }
         );
      }
   );
};

Batch File

Run TMSS10VolumeRename in test mode. Test mode allows you to execute TMSS10VolumeRename without making any alterations to the database to check the output is as expected.

TMSS10VolumeRename -S user:-password@serveraddress -V "US04.LTO.*" -c rename.cfg -N "*L4" > rename_out.txt 2> rename_err.txt

Adding the -l attribute places the execution into live mode, where the alterations are made to the Volumes in the database.

TMSS10VolumeRename -S user:-password@serveraddress -V "US04.LTO.*" -c rename.cfg -N "*L4" -l > rename_out.txt 2> rename_err.txt

Standard Output

Test Mode - rename_out.txt

             System: TapeTrack
 Report Description: Scan-File Load Report
    Production Time: Thursday, August 05, 2021 - 10:48:36 (AUS Eastern Standard Time)
       Report Width: 149 bytes

 Seq.   Record Barcode                                  Resolved As          Status Notes                                                            
 ------ ------ ---------------------------------------- -------------------- ------ ---------------------------------------------------------------- 
      1      1 100001                                   US04.LTO.100001      OK                                                                      
      2      2 100002                                   US04.LTO.100002      OK                                                                      
      3      3 100003                                   US04.LTO.100003      OK                                                                      
      4      4 100004                                   US04.LTO.100004      OK                                                                      
      5      5 100005                                   US04.LTO.100005      OK                                                                      
      6      6 100006                                   US04.LTO.100006      OK                                                                      
      7      7 100007                                   US04.LTO.100007      OK                                                                      
      8      8 100008                                   US04.LTO.100008      OK 
      9      9 100009                                   US04.LTO.100009      OK
     10     10 100010                                   US04.LTO.100010      OK                                  
 ------ ------ ---------------------------------------- -------------------- ------ ---------------------------------------------------------------- 

             System: TapeTrack
 Report Description: Volume Rename Report
    Production Time: Thursday, August 05, 2021 - 10:48:36 (AUS Eastern Standard Time)
       Report Width: 111 bytes

 Seq.   Old Identity         New Identity         Messages                                                     
 ------ -------------------- -------------------- ------------------------------------------------------------ 
      1 US04.LTO.100001      US04.LTO.100001L4    Not running in Live mode                                     
      2 US04.LTO.100002      US04.LTO.100002L4    Not running in Live mode                                     
      3 US04.LTO.100003      US04.LTO.100003L4    Not running in Live mode                                     
      4 US04.LTO.100004      US04.LTO.100004L4    Not running in Live mode                                     
      5 US04.LTO.100005      US04.LTO.100005L4    Not running in Live mode                                     
      6 US04.LTO.100006      US04.LTO.100006L4    Not running in Live mode                                     
      7 US04.LTO.100007      US04.LTO.100007L4    Not running in Live mode                                     
      8 US04.LTO.100008      US04.LTO.100008L4    Not running in Live mode
      9 US04.LTO.100007      US04.LTO.100009L4    Not running in Live mode                                     
     10 US04.LTO.100008      US04.LTO.100010L4    Not running in Live mode                                     
 ------ -------------------- -------------------- ------------------------------------------------------------ 

Live Mode - rename_out.txt

             System: TapeTrack
 Report Description: Scan-File Load Report
    Production Time: Thursday, August 05, 2021 - 10:48:36 (AUS Eastern Standard Time)
       Report Width: 149 bytes

 Seq.   Record Barcode                                  Resolved As          Status Notes                                                            
 ------ ------ ---------------------------------------- -------------------- ------ ---------------------------------------------------------------- 
      1      1 100001                                   US04.LTO.100001      OK                                                                      
      2      2 100002                                   US04.LTO.100002      OK                                                                      
      3      3 100003                                   US04.LTO.100003      OK                                                                      
      4      4 100004                                   US04.LTO.100004      OK                                                                      
      5      5 100005                                   US04.LTO.100005      OK                                                                      
      6      6 100006                                   US04.LTO.100006      OK                                                                      
      7      7 100007                                   US04.LTO.100007      OK                                                                      
      8      8 100008                                   US04.LTO.100008      OK 
      9      9 100009                                   US04.LTO.100009      OK
     10     10 100010                                   US04.LTO.100010      OK                                  
 ------ ------ ---------------------------------------- -------------------- ------ ---------------------------------------------------------------- 

             System: TapeTrack
 Report Description: Volume Rename Report
    Production Time: Thursday, August 05, 2021 - 10:48:36 (AUS Eastern Standard Time)
       Report Width: 111 bytes

 Seq.   Old Identity         New Identity         Messages                                                     
 ------ -------------------- -------------------- ------------------------------------------------------------ 
      1 US04.LTO.100001      US04.LTO.100001L4    Request OK                                     
      2 US04.LTO.100002      US04.LTO.100002L4    Request OK                                     
      3 US04.LTO.100003      US04.LTO.100003L4    Request OK                                    
      4 US04.LTO.100004      US04.LTO.100004L4    Request OK                                     
      5 US04.LTO.100005      US04.LTO.100005L4    Request OK                                     
      6 US04.LTO.100006      US04.LTO.100006L4    Request OK                                     
      7 US04.LTO.100007      US04.LTO.100007L4    Request OK                                    
      8 US04.LTO.100008      US04.LTO.100008L4    Request OK
      9 US04.LTO.100007      US04.LTO.100009L4    Request OK                                    
     10 US04.LTO.100008      US04.LTO.100010L4    Request OK                                    
 ------ -------------------- -------------------- ------------------------------------------------------------