Sei sulla pagina 1di 63

TapeTrack

Synchronization Guide

Gerard Nicol, GazillaByte LLC.

TapeTrack: Synchronization Guide


by Gerard Nicol
Published by GazillaByte LLC, 4600 South Syracuse Street, Denver CO 80327.
Publication date 2015
Copyright 2015 GazillaByte LLC.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations
appear in this book, and the author was aware of a trademark claim, the designations have been printed with the trademark symbol.
The TapeTrack and the TapeTrack Logo are registered trademarks of GazillaByte Pty Ltd.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of of any kind and assume
no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the
use of the information of programs contained herein.
No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other
electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical
reviews and certain other non-commercial uses permitted by copyright law.

Table of Contents
Who should read this guide? ............................................................................................... vii
Glossary ............................................................................................................................ 1
1. TapeTrack Support .......................................................................................................... 3
1.1. Introduction ......................................................................................................... 3
1.1.1. The TapeTrack Help Desk ........................................................................... 3
1.1.2. Accessing the Help Desk ............................................................................. 3
1.1.3. Dont leave your problem unfixed ................................................................. 3
1.1.4. Help us answer your question first time .......................................................... 3
1.1.5. Measuring your level of satisfaction ............................................................... 4
1.1.6. Suggesting enhancements or improvements in the product documentation ............. 4
2. TapeTrack Synchronization Suite ....................................................................................... 5
2.1. Introduction. ......................................................................................................... 5
2.1.1. What is synchronization? ............................................................................. 5
2.1.2. How does synchronization work? .................................................................. 5
2.1.3. Synchronization components. ........................................................................ 6
2.1.4. The benefits of synchronization. .................................................................... 6
2.2. Synchronization vectors. ......................................................................................... 6
2.3. Synchronization sources. ........................................................................................ 7
2.3.1. Synchronization fields. ................................................................................ 7
2.4. Synchronization prerequisites. ................................................................................. 7
2.5. Supported tape management systems ........................................................................ 8
2.6. Supported operating systems ................................................................................... 8
2.7. CPU and bandwidth considerations. ......................................................................... 9
2.8. Security considerations ........................................................................................... 9
2.9. Getting started ...................................................................................................... 9
2.9.1. Downloading the software ............................................................................ 9
2.9.2. Installing the software ................................................................................. 9
2.10. The components of a synchronization .................................................................... 10
2.10.1. The Synchronization Program .................................................................... 11
2.10.2. The Synchronization Source ...................................................................... 11
2.10.3. The Synchronization Definition File ........................................................... 11
2.11. Synchronization Engine Instructions ...................................................................... 12
2.11.1. Overview ............................................................................................... 12
2.12. Examples ......................................................................................................... 20
2.12.1. Tivoli Storage Manager (TSM) .................................................................. 20
2.12.2. CA-1 ..................................................................................................... 23
A. ................................................................................................................................... 26
A.1. Engine Syntax Reference ..................................................................................... 26
A.2. Management Commands ...................................................................................... 45
A.2.1. TMSS10MoveScratch ............................................................................... 45
A.2.2. TMSS10Sync .......................................................................................... 48
A.3. Diagnostic Commands ......................................................................................... 52
A.3.1. TMSS10Ping ........................................................................................... 52
Index ............................................................................................................................... 55

iii

List of Tables
2.1. Synchronization fields .................................................................................................... 7

iv

List of Examples
2.1. AddMoveDateAdjustment: Add 7 years to the Next Move Date if the Description contains
YEARLY ......................................................................................................................... 12
2.2. AddRepositoryOnWriteTime: Set the Repository based upon time from Write Date. ................ 13
2.3. AddRepositoryOnMoveDate: Move Volumes to RACK if their Move Date is today to 10 days
from today. ....................................................................................................................... 14
2.4. AddSkipOnRepositoryChange: Skip an update if the propsed change is HOLD and the current
Target Repository is LIBR. ................................................................................................. 15
2.5. SetInitialRepository: Set the initial Repository values to LIBR. ............................................ 15
2.6. SetMinRepositoryTime: Do not move a Volume if it has been off-site for less than one day. ...... 16
2.7. SetMoveDateFormat: Extract the Move Date in format MM/DD/YYYY. ............................... 17
2.8. SetPermanentDateValue: Set the permanent date to 1971-01-01 ........................................... 17
2.9. SetSkipOnMoveDateRange: Skip a Volume update if the proposed Move Date is between 10
days ago and today ............................................................................................................ 18
2.10. Skip the update of a Volume if the SYSTEM field is chaning and the Current Repository is
OFFS ............................................................................................................................... 18
2.11. SetVolumeScript: Eject all tapes that are being moved. ..................................................... 19
2.12. SetWriteTimeFormat: Extract the Write Time in format HH:MM:SS YYYY-MM-DD. ........... 20
2.13. TSM: Extracting the Volume Table .............................................................................. 21
2.14. TSM: Extracting the DRM Table ................................................................................. 21
2.15. TSM: Volume Table Synchronzation Definition File. ....................................................... 21
2.16. TSM: Sample Synchronization Script. ........................................................................... 22
2.17. CA-1: Extracting full inventory using GRW ................................................................... 23
2.18. CA-1: Synchronization definition file. ........................................................................... 23
2.19. CA-1: Sample synchronization JCL. .............................................................................. 24
A.1. Definition File syntax examples .................................................................................... 27
A.2. ConditionalEmbed: Embed a file if the current day is Monday or Tuesday. ............................ 28
A.3. Embed: Embed file extra_stuff.ttidef. ............................................................................. 28
A.4. SetVar: Set the variable PATHNAME to C:\tapetrack\stuff. ................................... 29
A.5. SetVar2Date: Set variable YESTERDAY to yesterday's date. ............................................. 30
A.6. SetVar2Date: Set variable START to the first day of this year and END to the last. ................. 30
A.7. SetVar2File: Set variable MYFILE to the smallest text file in C:\stuff. ............................ 31
A.8. WriteMsg: Write a message to the current user. ............................................................... 32
A.9. AddExclusionOnValue: Do not process a record if the VOLUME field starts with CLN ........... 32
A.10. AddString: Define a header (ANSI page break) with 7 records, skip records not starting with
an integer and terminate processing at the first blank record ...................................................... 33
A.11. AddTranslation: Append L3 to each VOLUME field if the value starts with a zero. ............... 35
A.12. AddTranslation: Truncate a VOLUME field to 6 characters when the Volume-ID starts with
an A. ............................................................................................................................... 35
A.13. AddTranslation2: Append L3 to each VOLUME field value of USER1 is HCART3. .............. 36
A.14. AddTranslation2FromFile: Append L3 to each VOLUME field if the value of the MEDIA
mathces a pattern within a record of c:\data\LTO3Volumes.txt. ...................................... 36
A.15. AddTranslation2FromFile: Append L3 to each VOLUME field if the value matches a
pattern within a record of c:\data\LTO3Volumes.txt. .................................................... 37
A.16. ChangeCase: Capitalize the value of the DESCRIPTION field. .......................................... 38
A.17. Extract: Extract VOLUME field from offset 10, length 6 of the body of a report. ................... 39
A.18. Extract: Extract VOLUME field from the 2nd element of a CSV file. ................................. 39
A.19. Extract: Extract REPOSITORY field from offset 70, length 4 of the 3rd record of a
header. ............................................................................................................................. 39
A.20. RemoveSpaces: Remove leading and trailing spaces from REPOSITORY field. .................... 39
A.21. SetCSVDelimiter: Parse a CSV file using a comma as the delimiter. ................................... 40
A.22. SetFile: Set the input file to c:\data\tapetrack\control-t.txt. ......................... 40

TapeTrack

A.23. SetHeaderCount: Define a header (ANSI page break) with 7 records, skip records not
starting with an integer and terminate processing at the first blank record. .................................... 41
A.24. SetLiteral: Set field REPOSITORY to literal ACME. ...................................................... 42
A.25. SetNoBodyRecords: Process the last record of a header as a body record. ............................ 42
A.26. SetODBC: Select the Microsoft Access Driver and pass the Access file to use. ..................... 43
A.27. SetODBC: Select the Microsoft Excel Driver and pass the Excel file to use. ......................... 43
A.28. SetPostScript: Rename a file with a time stamp after the file is processed. ........................... 43
A.29. SetRemoveChars: Remove dashes and commas from a field. ............................................ 44
A.30. SetSQL: Select all fields from table volumes ................................................................. 44
A.31. SetSQL: Select the Barcode and Location fields from Excel Spreadsheet workbook
Inventory. ......................................................................................................................... 45
A.32. SetTruncationChars: Truncate the field VOLUME at any character - or [ ............................. 45
A.33. TMSS10MoveScratch: Produce a Scratch Report. ........................................................... 47
A.34. TMSS10Sync: List supported Processing Directives. ....................................................... 51
A.35. TMSS10Sync: Run program in Dump Mode. ................................................................. 51
A.36. TMSS10Sync: Produce a formatted listing with a ruler every 10 records. ............................. 51
A.37. TMSS10Ping: send pings request via a proxy server, creates a trace file and displays the
trace file. .......................................................................................................................... 53

vi

Who should read this guide?


This guide has been written to assist those responsible for tape management with the process of integrating
their backup software or tape management system with the TapeTrack Media Management Software.
For those who have their own TapeTrack Framework Server, these instructions relate to connecting to
your own system, while, for those who use TapeTrack via a relationship with their data protection provider,
these instructions relate to connecting into your vendor's system.

vii

Glossary
A
Automated Tape Library

A robotically control library of tapes.

ATL

See Automated Tape Library.

B
Barcode

A scannable representation of the identity of a tape Volume.

C
Customer

The owner of a collection of Media Types.

Current Repository

The Repository where a Volume current is believed to be.

D
Data Cluster

A pre-defined label that can be assigned to a Volume so that a Simple Managment


Rule can calculate a Next Move Date in a non-static identify.

DR Strategy

A pre-identified, pre-loaded list of Volumes that would be required to recover a


specific system to a specific point in time.

F
Fully-Qualified Barcode

A barcode that represents a Fully-Qualified Volume-ID (including Customer-ID,


Media-ID and Volume-ID, usually delimited by a period).

M
Media Type

A collection of like tapes.

N
Next Move Date

A pre-identified, pre-loaded list of Volumes that would be required to recover a


specific system to a specific point in time.

R
Repository

A high-level, place-holder description of the location of a Volume.

S
Scanned Repository

The Repository where a Volume was last scanned.

Glossary

Scratch Tape

A Volume that no longer contains data that is required and has been identified as
a candidate for re-use.

Simple Management Rule

A rule that can be invoked when a Volume is moved from one Repository to
another that will automatically calculate the Next Move Date of a Volume.

T
Target Repository

The Repository where a Volume is moving to.

U
User

A user who logs into the TapeTrack System.

V
Volume

A physical tape.

VOLSER

See Volume.

Z
Zone

A physical tape storage location.

Chapter 1. TapeTrack Support


1.1. Introduction
As a user of TapeTrack Software we want to ensure that your use of our software is trouble free and that
you get the most out of the product features.
In the event that you have a:
1. Concern that the product is not functioning as documented,
2. Suggestion on how the product can be improved, or a
3. Question about how to use a feature of the product
wed really like to hear from you, and will do our very best to address your question or concern.

1.1.1. The TapeTrack Help Desk


GazillaByte provides a Help Desk service for TapeTrack which is always available, so that you can ask
questions and review the answers to your previous questions, at a time which is convenient for you.
The Help Desk also provides access to Frequently Asked Questions (FAQs) and tutorials that may be of
assistance.

1.1.2. Accessing the Help Desk


There are three ways that you can access the TapeTrack Help Desk:
Web

http://support.gazillabyte.com

Email

<support@gazillabyte.com>

Phone

+1-720-583-8880

1.1.3. Dont leave your problem unfixed


Despite our best efforts, sometimes it takes several days to fix some complex problems. If you are
experiencing any problems please let us know as soon as you can, so that we can provide you with a quick
resolution.

1.1.4. Help us answer your question first time


We aim to answer your questions on our first attempt, but there are things that you can do to help us
achieve that goal:
1. Ensure that you include all of the information that we may need to contact you.
2. Clearly identify the problem you are experiencing.
3. Identify the product that you are using and the platform you are using it on.
4. Clearly identify the impact that it is having on your user experience.

TapeTrack Support

5. If you have not experienced the problem in the past please provide the details of any changes which
have been made prior to you experiencing the problem.

1.1.5. Measuring your level of satisfaction


When you contact the Help Desk, you will be provided with a unique problem ticket number. When this
problem ticket number is closed you will automatically be sent a follow-up email asking you to rate our
response to your problem.
Rating your experience is as simple as clicking on one of two URLs included in the email. Please consider
letting us know how we have done because this is one of several measurements we use to improve your
experience.

1.1.6. Suggesting enhancements or improvements in the


product documentation
The version of TapeTrack you use today owes a lot to the many suggestions and input of our users over
the past decade. If you enjoy using our software please pass-it-on by making suggestions that can help us
to continue improving the product.
We try very hard to produce documentation that explains all that you want to know about our software,
but there is always room for improvement. If you have any suggestions, or if you have difficulty with our
documentation please let us know so we can address the problems.

Chapter 2. TapeTrack Synchronization


Suite
2.1. Introduction.
2.1.1. What is synchronization?
TapeTrack's Synchronization Suite is a powerful toolkit that allows you to set fields within TapeTrack
based upon the values of fields within your backup or tape management software.

2.1.2. How does synchronization work?


The logic flow of synchronization is as follows:

1. Load the definition file to instruct the program on where to get the data and how to interpret the data.
2. Logon to the TapeTrack Framework Server>
3. Read each record from the data source, establish each of the fields to be synchronized for each record.
4. On the first record, or on any record where the Customer and/or Media scope change, download a cache
of Volume information from the TapeTrack Framework Server.
5. Where the Volume information has changed apply the update to the TapeTrack Server.

TapeTrack Synchronization Suite

6. On the last record from the data source print statistics about the update session.

Note
To reduce the overhead of retrieving records, when the Customer and/or Media scope
change all information on all Volumes within the current scope is downloaded and loaded
into a cache. Where the Customer and/or Media scope do not change this means that the
synchronization program only needs to download this information once. Care should be taken
not to randomize Volumes within a Customer and or Media scope as this will degrade the
performance of the program. If Volume scope is randomized it is strongly recommended that
the data source be sorted as a step prior to synchronization.

2.1.3. Synchronization components.


The TapeTrack Synchronization Suite comprises the following Command Line Interface (CLI) programs:
1. TMSS10Sync(1)
2. TMSS10CSV2Fixed(1)
3. TMSS10DRStrategy(1)
4. TMSS10Ping(1)
5. TMSS10SingleSpace(1)

2.1.4. The benefits of synchronization.


Synchronization with your backup or tape management system has the following benefits:
1. Automation of tape movement requests, including setting description fields and the next move date of
each tape.
2. The ability to synchronize off a picking and distribution list or a complete inventory list.
3. Elimination of errors that are possible with manual data input.
4. Ensuring that tape movements are not dependent on manual intervention that cease if a key employee
is absent.
5. The ability to securely synchronize over the Internet.

2.2. Synchronization vectors.


The TapeTrack Synchronization Suite is designed in a way that it can be implemented to synchronize data
using the following techniques:
1. Direct invocation from a source computer, where the data is pushed to a TapeTrack Server.
2. Direct invocation from the TapeTrack server where data is pulled from a source computer and then
updated locally on the TapeTrack Server.
3. Invocation via the inetd(8) service to provide a dedicated synchronization server where data can be
send via the netcat(1) command.
4. Invocation via procmail(5) to facilitate the automated processing of data via email.

TapeTrack Synchronization Suite

2.3. Synchronization sources.


The TapeTrack Synchronization Suite can process data provided via:
1. A direct ODBC connection to any ODBC data source such as Microsoft Access, Microsoft Excel,
Microsoft SQL Server, Oracle Database etc.
2. Fixed length text data.
3. Comma or character delimited text (CSV).
4. XML.
5. Any other file format that can be converted or translated into one of the supported formats above.

2.3.1. Synchronization fields.


The following fields can be set by synchronization:

Table 2.1. Synchronization fields


Field

Max Description
Length

CUSTOMER

4 Customer-ID

MEDIA

4 Media-ID

VOLUME
REPOSITORY

10 Volume-ID
4 Repository-ID

REPOSITORY_DESC

20 Description of Repository (will be used to set the REPOSITORY


field)

SLOT

10 Slot for Repository.

DATACLUSTER

256 Data Cluster Value (Data Cluster must already exist)

DESCRITION

256 Volume Description (use program flag to set Extended


Attributes)

MOVEDATE

64 Move Date (must have SetMoveDateFormat defined)

WRITETIME

64 Write Time (must have SetWriteTimeFormat defined)

CONTAINER

20 Fully qualified Container barcode

SYSTEM

10 System this Volume belongs to

ENCRYPTED

10 Is Volume encrypted (YES, NO, TRUE, FALSE)

SCRATCH

10 Is Volume scratch (YES, NO, TRUE, FALSE)

2.4. Synchronization prerequisites.


To be able to synchronize you will need the following components and information:
1. The TapeTrack Synchronization Suite software fully installed.
2. The address and port of your TapeTrack Server.
3. The User-ID and password of your TapeTrack Server.

TapeTrack Synchronization Suite

4. The TapeTrack Customer-ID and Media-ID for the tapes being synchronized.
5. The TapeTrack Repository-IDs for each location that a tape volume may be moved to.
6. The ability to extract data from your backup or tape management software using either an ODBC
connection or command line interface.
7. Access to schedule a task under Windows Task Scheduler or cron(8).

2.5. Supported tape management systems


TapeTrack Synchronization works with any backup or tape management software where you can get an
ODBC connection or access to data via a command or reporting interface.
Systems that have been synchronized in the past include:
1. z/Series
a. RMM
b. CA-1
c. Control-M/T
d. Zara
e. TLMS
2. iSeries
BRMS
3. Distributed Systems
a. IBM Tivoli Storage Manager (TSM)
b. CA Brightstore ArcServ
c. HP Data Protector
d. CommVault
e. Symantec BackupExec
f. Symantec NetBackup

2.6. Supported operating systems


Native binaries are available for the following operating systems:
z/OS (via UNIX System Services)
IBMi (via PASE)
Solaris (Intel and SPARC)
HP UX

TapeTrack Synchronization Suite

AIX
Linux (Intel and ARM)
Microsoft Windows (32 and 64 Bit)

2.7. CPU and bandwidth considerations.


The TapeTrack Synchronization Suite programs are written in C and are optimized to use minimal
bandwidth and CPU.
To calculate the potential bandwidth used during a synchronization, the program will download a cache
of volume information with each volume record consisting of approximately 300 bytes. If the volume also
has a description, an additional 256 bytes may be downloaded.
This means that if you have a library of 10,000 tape volumes, each of which has a description the cache
will be:
(10,000 x 300 bytes) + (10,000 x 256 bytes) = 5.5 megabytes.
The 5.5 megabytes the compressed using level 9 gzip(3) compression which usually compresses down
to approximately 1 megabyte.
Then, if 100 tapes are updated, this would consume (100 x 300 bytes + 100 x 256 bytes) 55KB of uploaded
data. This data is usually compressed at a ratio of 2:1, which means that the total upload bandwidth is
around 28KB.

2.8. Security considerations


All TapeTrack data sent to and received from the TapeTrack server is encrypted using AES 256 bit private
key encryption. In addition, all password values are also hashed using the MD5 algorithm before then
being encrypted 1, this ensures that any memory dump of the server address space will never show the
unencrypted password.

2.9. Getting started


2.9.1. Downloading the software
The TapeTrack Synchronization Suite software can be downloaded from the following URLS:
http://mirror-us.tapetrack.com
http://mirror-europe.tapetrack.com

2.9.2. Installing the software


2.9.2.1. Windows
The software is packaged using an InstallShield Windows Installer. To invoke the installation simply
double click on the install file.
1

Passwords are not hashed with the MD5 algorithm where Windows Active Directory password authentication is being used.

TapeTrack Synchronization Suite

2.9.2.2. Linux, AIX and IBMi


The software is packaged using Redhat Package Manager (RPM). To invoke the installation simply enter
the command

rpm -i tapetrack-clients-2013.3.1.rpm
If you do not have RPM installed on your system a tar archive can be supplied on request.

2.9.2.3. z/OS
The software is packaged as a tar archive and can be installed under USS with the following commands

cd /usr/bin
mkdir /usr/bin/tapetrack
cd /usr/bin/tapetrack
gunzip tapetrack-clients-2013.3-1.s390.tar.gz
tar xvf tapetrack-clients-2013.3-1.s390.tar
Change directory to /usr/bin.
Create directory to /usr/bin/tapetrack.
Change directory to /usr/bin/tapetrack.
Decompress gzip file.
Extract tar file.

2.9.2.4. Solaris
The software is packaged using the Solaris Package Manager. To invoke the installation simply enter the
command:

pkgadd -d TapeTrack-Clients.2013.4.SPARC.pkg

2.9.2.5. HPUX
The software is packaged as a tar archive.

2.10. The components of a synchronization


A synchronization processes uses the following components:
1. The TMSS10Sync(1) command line program (the Synchronization Program).
2. Input data from a source backup or tape management system (the Synchronization Source).
3. A definition file that tells the Synchronization Program how to interpret the Synchronization Source
(the Synchronization Definition file).
4. A configuration file (optional)

10

TapeTrack Synchronization Suite

2.10.1. The Synchronization Program


The Synchronization command line program is TMSS10Sync(1). This program will read in the
Synchronization Definition File to establish the synchronization criteria, and then read the Synchronization
Source to obtain the information that should be synchronized.

2.10.2. The Synchronization Source


The Synchronization Sources is extracted from a backup or tape management system. This source can be
a text file, a CSV file, a file in any format that can be converted to a text or CSV file, or an ODBC source.
The method of extracting the source data from a backup or tape management program varies from product
to product.
At a minimum, you will need a list of tape Volume-IDs.
You will also need some criteria to establish where each tape should be moved. If the only data is a list of
Volume-IDs, and all of these volumes are being moved to the same constant location, the synchronization
process can assume the location by the context of the file.
Other criteria that may be used to establish the location of a tape can include:
1. The tape pool.
2. When the volume was written.
3. The quantity of data on a volume.
4. The volume expiry date.
5. The volume serial range
6. Any combination of the above.

2.10.3. The Synchronization Definition File


The Synchronization Definition File is a text file that contains the instructions that tell the Synchronization
Program how to interpret the data passed in the Synchronization Source.
The definition file uses the TapeTrack INI File Language, this language is made up of:
Internal Instructions

These instructions set variables and load instructions from external


files.
These instructions are known as INI Engine Instructions and are
described in the Appendix of this document.

Application Instructions

These instructions configure settings specific to the application, in


this case the synchronization process.
The synchronization process uses two categories of application
instructions, these are Import Engine Instructions (described in
the Appendix of this document), and Synchronization Engine
Instructions (described in the following section).

11

TapeTrack Synchronization Suite

2.11. Synchronization Engine Instructions


2.11.1. Overview
Synchronization Engine Instructions are passed to the TapeTrack Synchronization Engine. This engine is
responsible for updating information in the TapeTrack Database.

AddMoveDateAdjustment
addmovedateadjustment

AddMoveDateAdjustment
Add a specific number of days, months, years to the Next Move Date if a field value matches a filter value.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
AddMoveDateAdjustment (field, filter, years, months, days);
string field;
string filter;
integer years;
integer months;
integer days;
field

The field to compare against.

filter

A filter value to compare the field value against.

years

The number of years to add to the Next Move Date.

months

The number of months to add to the Next Move Date.

days

The number of days to add to the Next Move Date.

Examples
Example 2.1. AddMoveDateAdjustment: Add 7 years to the Next Move Date if the
Description contains YEARLY
Extract(MOVEDATE, 4, 10, 0);
SetMoveDateFormat("%%d/%%m/%%Y");
Extract(DESCRIPTION, 5, 100, 0);
AddMoveDateAdjustment(DESCRIPTION, "*YEARLY*"; 7, 0, 0);

Extract the MOVEDATE from offset 4, length 10 of the report body.

12

TapeTrack Synchronization Suite

Set the MOVEDATE format.


Extract the DESCRIPTION from offset 5, length 100 of the report body.
Adjust the extracted MOVEDATE by 7 years if the DESCRIPTION matches the pattern
*YEARLY*.

AddRepositoryOnWriteTime
addrepositoryonwritetime

AddRepositoryOnWriteTime
Set a Repository value based upon a range of Write Times.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
AddRepositoryOnWriteTime (field, filter, time, target, movedate);
string
string
string
string
string

field;
filter;
time;
target;
movedate;

field

A field for comparison.

filter

A filter to compare against.

time

Number of hours, days, months and years from the Write Date.

target

The Target Repository.

movedate

Number of hours, days, months and years from the Write Date to set the Move Date.

Examples
Example 2.2. AddRepositoryOnWriteTime: Set the Repository based upon time
from Write Date.
Extract(WRITEDATE, 10, 20, 0);
SetWriteDateFormat("%%H:%%M:%%S %%d/%%m/%%Y");
Extract(DESCRIPTION, 11, 100, 0);
AddRepositoryOnWriteTime(DESCRIPTION, "*YEARLY*", "0:1", "LIBR", "0:1");
AddRepositoryOnWriteTime(DESCRIPTION, "*YEARLY*", "0:0:1", "OFFS", "0:1:1");

Extract the WRITEDATE from column 10, length 20.


Set the WRITEDATE format.
Extract the DESCRIPTION from column 11, length 100.
If the DESCRIPTION contains YEARLY and the WRITEDATE is within one day move the Volume
to LIBR and give it a one day MOVEDATE.

13

TapeTrack Synchronization Suite

If the DESCRIPTION contains YEARLY and the WRITEDATE is within one year move the Volume
to OFFS and give it a one year MOVEDATE.

AddRepositoryOnMoveDate
addrepositoryonmovedate

AddRepositoryOnMoveDate
Set a Repository based upon the value of the Next Move Date.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
AddRepositoryOnMoveDate (range, target);
string range;
string target;
range

Range of Move Dates.

range

Target Repository value.

Examples
Example 2.3. AddRepositoryOnMoveDate: Move Volumes to RACK if their Move
Date is today to 10 days from today.
AddRepositoryOnMoveDate("*:*+10", "RACK");

AddSkipOnRepositoryChange
addskiponrepositorychange

AddSkipOnRepositoryChange
Skip the update of a Volume if the Current of Target Repositry is equal to a filter value.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
AddSkipOnRepositoryChange (proposed, target, current);
string proposed;
string target;

14

TapeTrack Synchronization Suite

string current;
proposed

Filter value representing the proposed change to the Target Repository.

target

Filter value representing the current Target Repository value.

current

Filter value representing the current Current Repository Value.

Examples
Example 2.4. AddSkipOnRepositoryChange: Skip an update if the propsed change
is HOLD and the current Target Repository is LIBR.
AddSkipOnRepositoryChange("HOLD", "LIBR", "*");

SetInitialRepository
setinitialrepository

SetInitialRepository
Set the Current, Target and Scanned Repository value for newly added Volumes.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetInitialRepository (repository);
string repository;
repository

The initial Repository values for a new Volume.

Note
If the Media Type for the added Volume has an Initial Repository value set in its options,
this value will override any value set by SetInitialRepository.

Examples
Example 2.5. SetInitialRepository: Set the initial Repository values to LIBR.
SetInitialRepository("LIBR");

SetMinRepositoryTime
setminrepositorytime

15

TapeTrack Synchronization Suite

SetMinRepositoryTime
Set the minimum number of minutes a Volume can be in a specific Repository.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetMinRepositoryTime (repository, minutes);
string repository;
integer minutes;
repository

A Repository filter for the Volume's Target Repository.

minutes

Number of minutes a Volume must be in a Repository before it can move.

Examples
Example 2.6. SetMinRepositoryTime: Do not move a Volume if it has been off-site
for less than one day.
SetMinRepositoryTime("OFFS", 1440);

SetMoveDateFormat
setmovedateformat

SetMoveDateFormat
Define the way that the MOVEDATE field should be converted into a date value.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetMoveDateFormat (filepath);
string filepath;
filepath

The full or relative path to a file that you wish to embed.

Note
It should be noted that by the time this function is run the INI engine has already tried to
resolve environmental varialbes so it is necessary to include two percentage symobols for
each symbol that would usually be required by strptime(3).

16

TapeTrack Synchronization Suite

Examples
Example 2.7. SetMoveDateFormat: Extract the Move Date in format MM/DD/
YYYY.
Extract(MOVEDATE, 10, 10, 0);
SetMoveDateFormat("%%m/%%d/%%Y");

SetPermanentDateValue
setpermanentdatevalue

SetPermanentDateValue
Embed a file containing additional definition language elements.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetPermanentDateValue (date);
string date;
date

The date that should be considered permanent.

Examples
Example 2.8. SetPermanentDateValue: Set the permanent date to 1971-01-01
Extract(MOVEDATE, 10, 10, 0);
SetMoveDateFormat("%%d/%%m/%%Y");
AddTranslation(MOVEDATE, "PERMANENT", "01-01-1971");
SetPermanentDateValue("1971-01-01");

SetSkipOnMoveDateRange
setskiponmovedaterange

SetSkipOnMoveDateRange
Skip the update of a Volume if the Move Date value is withing a specific range.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

17

TapeTrack Synchronization Suite

Syntax
SetSkipOnMoveDateRange (range);
string range;
range

Range of dates that should be used for comparison against the proposed Move Date.

Examples
Example 2.9. SetSkipOnMoveDateRange: Skip a Volume update if the proposed
Move Date is between 10 days ago and today
SetSkipOnMoveDateRange("*-10:*");

SetSkipOnSystemChange
setskiponsystemchange

SetSkipOnSystemChange
Skip the update of a Volume if the SYSTEM field is changing.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetSkipOnSystemChange (target);
string target;
target

Filter value representing the Current Repository.

Examples
Example 2.10. Skip the update of a Volume if the SYSTEM field is chaning and the
Current Repository is OFFS
SetSkipOnSystemChange("OFFS");

SetVolumeScript
setvolumescript

SetVolumeScript
Set a script to be called for each of the updated volumes.

18

TapeTrack Synchronization Suite

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetVolumeScript (script);
string script;
script

The script to be called for each Volume.

Note
Before each script is called the engine will resolve the variables $CUSTOMER-ID,
$MEDIA-ID, $VOLUME-ID.

Examples
Example 2.11. SetVolumeScript: Eject all tapes that are being moved.
SetVolumeScript("eject $VOLUME-ID");

SetWriteTimeFormat
setwritetimeformat

SetWriteTimeFormat
Define the way that the WRITETIME field should be converted into a time value.

Phase
This instruction is used by the TapeTrack Synchronization Engine.

Syntax
SetWriteTimeFormat (format);
string format;
format

The Write Time format in strptime(3) format.

Note
It should be noted that by the time this function is run the INI engine has already tried to
resolve environmental varialbes so it is necessary to include two percentage symobols for
each symbol that would usually be required by strptime(3).
19

TapeTrack Synchronization Suite

Examples
Example 2.12. SetWriteTimeFormat: Extract the Write Time in format
HH:MM:SS YYYY-MM-DD.
Extract(WRITETIME, 10, 20, 0);
SetWriteTimeFormat("%%H:%%M:%%S %%Y-%m-%d");

2.12. Examples
2.12.1. Tivoli Storage Manager (TSM)
2.12.1.1. Overview
Tivoli Storage Manager (or TSM) is IBM's enterprise backup solution, and provides both a command line
interface program that can be used to query the informatio required for synchronization, and and ODBC
driver that allows you to directly query data from the TSM database.
TSM is designed around several database tables that must be queried to get a complete list of tapes. These
tables are:
The Volume Table.

This table lists all tapes that contain active data for a given TSM system.
Any Volume that become scratch and is no longer managed by the DRM
subsystem will be dropped from this table.

The DRM Table.

This table lists all tapes are considered critical for recovery purposes.

The Library Table.

This table is only available on servers that are considered library masters
and lists all Volumes that are in an ATL environment. This table will also
include scratch tapes that are currently in an ATL.

Note
TSM is highly configurable, but by default has the following locations that a tape may be in:
Mountable

The Volume is available for use.

Courier

The Volume is waiting to be picked-up to be take off-site.

Courier Retrieve

The Volume has been picked-up to be taken off-stie.

Vault

The Volume is currently belieived to be off-site.

Vault Retrieve

The Volume needs to be returned from off-site.

Note
The location field in the Volume and state field DRM tables do not represent the same value.
The location field in the Volume table represents the percieved current location of a Volume,
while the state field in the DRM table may represent the current location, but may also
represent the destination location of a tape.
20

TapeTrack Synchronization Suite

Note
TSM will drop Volumes from both the Volume and DRM tables when they become scratch.
Although these Volumes may now be in an ATL and visible by querying the Library Master
Server, they may also be elsewhere, including a scratch rack and not appear in any TSM
table. To identify any scratch tapes that may have evaded being recalled from off-site, it is
good practice to set the SCRATCH field during each synchronizatio and to periodically run
the TMSS10MoveScratch(1) command.

2.12.1.2. Data Extraction


Example 2.13. TSM: Extracting the Volume Table
dsmadmc -dataonly=yes -id=userid -pa=password \
-tcpserveraddress=tsm01.gazillabyte.local \
-displaymode=table -outfile=TSM-Volumes.csv \
-commadelimited "select volume_name,location,stgpool_name from volumes"

Call the TSM CLI dsmadmc, supress headings and pass userid and password.
Pass TSM server name.
Output in table mode to file TSM-Volumes.csv.
Output in CSV mode and pass query data.

Example 2.14. TSM: Extracting the DRM Table


dsmadmc -dataonly=yes -id=userid -pa=password \
-tcpserveraddress=tsm01.gazillabyte.local \
-displaymode=table -outfile=TSM-DRM.csv \
-commadelimited "select volume_name,state,stgpool_name from drmedia"

Call the TSM CLI dsmadmc, supress headings and pass userid and password.
Pass TSM server name.
Output in table mode to file TSM-Volumes.csv.
Output in CSV mode and pass query data.

2.12.1.3. Synchronization Definition File


Example 2.15. TSM: Volume Table Synchronzation Definition File.
SetFile("TSM-Volume.csv");
SetCSVDelimiter(",");
Extract(VOLUME, 1, 8, 0);
Extract(REPOSITORY, 2, 20, 0);
Extract(DESCRIPTION, 3, 100, 0);
AddTranslation(REPOSITORY, "Vault", "OFFS");
AddTranslation(REPOSITORY, "Courier*", "OFFS");
AddTranslation(REPOSITORY, "Courier*", "LIBR");
SetLiteral(SCRATCH, "false");
Set the file to process (otherwise STDIN.
Set the CSV delimiter to a comma and tell the engine to process file as CSV.
Extract the Volume-ID from the 1st column.

21

TapeTrack Synchronization Suite

Extract the Repository-ID from the 2nd column.


Extract the Description from the 3rd column.
If the Repository-ID is Vault then set the Repository-ID to OFFS.
If the Repository-ID starts with Courier then set the Repository-ID to OFFS.
If the Repository-ID is any other value set the Repository-ID to LIBR.
Set the Scratch to false for all tapes in the DRM file.
See SetFile, SetCSVDelimiter, SetLiteral, Extract, AddTranslation

2.12.1.4. Sample Script


Example 2.16. TSM: Sample Synchronization Script.
#!/bin/bash
set -e
set
set
set
set
set

OUTDIR=/var/tapetrack/reports
ETC=/etc/tapetrack
UID=gnicol
PW=guessme
TSMIP=tsm01.gazillabyte.local

echo "Step 1: Extracting DRM information from TSM Server: " $TSMIP
dsmadmc -dataonly=yes -id=$UID -pa=$PW \
-tcpserveraddress=$TSMID \
-displaymode=table -outfile=$OUTDIR/TSM-DRM.csv \
-commadelimited "select volume_name,state,stgpool_name,voltype from drmedia"
echo "Step 2: Synchronizing with TapeTrack"
TMSS10Sync -a -d $ETC/TSM-DRM.ttidef \
-S gnicol:-$PW@tapetrack.gazillabyte.local \
< $OUTDIR/TSM-DRM.csv \
> $OUTDIR/TSM-DRM-Sync.stdout \
2> $OUTDIR/TSM-DRM-Sync.stderr \
echo "Step 3: Extracting Volume information from TSM Server: " $TSMIP
dsmadmc -dataonly=yes -id=$UID -pa=$PW \
-tcpserveraddress=$TSMID \
-displaymode=table -outfile=$OUTDIR/TSM-VOL.csv \
-commadelimited "select volume_name,location,stgpool_name from volumes"
echo "Step 4: Synchronizing with TapeTrack"
TMSS10Sync -a -d $ETC/TSM-DRM.ttidef \
-S gnicol:-$PW@tapetrack.gazillabyte.local \
< $OUTDIR/TSM-VOL.csv \
> $OUTDIR/TSM-VOL-Sync.stdout \
2> $OUTDIR/TSM-VOL-Sync.stderr \
if [[ $(date +%u) -eq 1 ]] ; then
echo TMSS10MoveScratch -S gnicol:-$PW@tapetrack.gazillabyte.local \
-R "LIBR"
fi

Stop processing if we hit a command error.


Set some environmental variables.
Connect to TSM and get the DRM table.
Synchronize off the DRM table.
Connect to TSM and get the Volume table.
Synchronize off the Volume table.
Check to see if today is Monday.
Move any Volume that is still scratch.

22

TapeTrack Synchronization Suite

2.12.2. CA-1
2.12.2.1. Overview
CA-1 is one of two z/Series tape management products sold by Computer Associates (the other being
TLMS). CA-1 provides two generalized methods for extracting data from the CA-1 database (know ans the
TMC). These programs are the Generalized Report Writer (GRW) and EARL (CA's reporting language).

2.12.2.2. Data extraction


Example 2.17. CA-1: Extracting full inventory using GRW
//CA1LIST EXEC PGM=TMSGRW
//SYSOUT DD SYSOUT=A
//TMSRPT DD DSN=GNICOL.CA1LIST,DISP=(NEW,CATLG,DELETE),
//
SPACE=(CYL,(10,1),RLSE)
//SYSIN
DD *
CONTROL-SECTION
SORT A-VOLSER
TITLE 'COMPLETE TAPE INVENTORY'
ALTER DSNB=NO
DEFINE LOW1 CH '000000'
DEFINE HIH1 CH '999999'
PROCESS-SECTION
WHEN VOLSER GE LOW1
AND VOLSER LE HIH1
LIST
REPORT-SECTION
PRINT VOLSER
PRINT OUTCODE
PRINT SLOT
/*

2.12.2.3. Synchronization definition file


Example 2.18. CA-1: Synchronization definition file.
SetFile("DD:CA1");
AddString(HEADER, 0, "1*");
SetHeaderCount(2);
AddString(START, 3, "VOLSER*");
AddString(EXCLUSION, 3, "VOLSER*");
AddString(EXCLUSION, 3, " *");
AddString(TERMINATE, 1, "*RECORDS READ*");
SetLiteral(CUSTOMER, "ACME");
SetLiteral(MEDIA, "3592");
Extract(VOLUME, 3, 6, 0);
Extract(REPOSITORY, 12, 4, 0);

23

TapeTrack Synchronization Suite

AddTranslation(REPOSITORY, "OFFS", "OFFS");


AddTranslation(REPOSITORY, "*", "LIBR");
Set the input file to the CA1 DD.
A header is a string starting with an asterick in offset 0 (ANSI Page Break).
There are 2 heading records in this input.
Start processing Volumes when there is the string VOLSER in offset 3.
Exclude the record with the VOLSER string in offset 3.
Exclude any record with a space in offset 3.
Stop processing completely when you het the string RECORDS READ in offset 1.
Set the TapeTrack Customer-ID to to ACME.
Set the TapeTrack Media-ID to 3592.
Get the Volume-ID from offset 3, length 6 of the body of the report.
Get the Repository-ID from offset 12, length 4 of the body of the report.
If the Repository-ID value is OFFS then leave it as-is.
If the Repository-ID value is anything else then set it to LIBR.
See SetFile, AddString, SetHeaderCount, SetLiteral, Extract, AddTranslation

2.12.2.4. Sample Script


Example 2.19. CA-1: Sample synchronization JCL.
//TAPETRAC JOB (),'TAPETRACK BATCH'
//*
//* List all CA-1 Volumes
//*
//CA1LIST EXEC PGM=TMSGRW
//SYSOUT DD SYSOUT=A
//TMSRPT DD DSN=GNICOL.CA1LIST,DISP=(NEW,CATLG,DELETE),
//
SPACE=(CYL,(10,1),RLSE)
//SYSIN
DD *
CONTROL-SECTION
SORT A-VOLSER
TITLE 'COMPLETE TAPE INVENTORY'
ALTER DSNB=NO
DEFINE LOW1 CH '000000'
DEFINE HIH1 CH '999999'
PROCESS-SECTION
WHEN VOLSER GE LOW1
AND VOLSER LE HIH1
LIST
REPORT-SECTION
PRINT VOLSER
PRINT OUTCODE
PRINT SLOT
/*
//SYNC
EXEC PGM=BPXBATSL
//STDOUT DD SYSOUT=*
//CA1
DD DSN=*.CA1LIST.TMSRPT,DISP=SHR
//STDERR DD SYSOUT=*
//CONFIG DD *

24

TapeTrack Synchronization Suite

SetFile("DD:CA1");
AddString(HEADER, 0, "1*");
SetHeaderCount(2);
AddString(START, 3, "VOLSER*");
AddString(EXCLUSION, 3, "VOLSER*");
AddString(EXCLUSION, 3, " *");
AddString(TERMINATE, 1, "*RECORDS READ*");
SetLiteral(CUSTOMER, "ACME");
SetLiteral(MEDIA, "3592");
Extract(VOLUME, 3, 6, 0);
Extract(REPOSITORY, 12, 4, 0);
AddTranslation(REPOSITORY, "OFFS", "OFFS");
AddTranslation(REPOSITORY, "*", "LIBR");
/*
//STDPARM DD *
pgm /usr/bin/TMSS10Sync -S fred:-pw@10.1.1.1 -a -d DD:CONFIG
/*
Execure the CA-1 Generalized Report Writer.
Write the CA-1 report out to the TMSRPD DD.
Execute batch USS.
Call TMSS10Sync.

25

A.1. Engine Syntax Reference


1. INI Engine Instructions
1.1. Overview
INI Engine Instructions are instructions passed the the TapeTrack INI Engine. This engine is responsible
for loading an INI file, setting local variables, and including and embedded files.
It should be noted that during this initial phase and value prefixed with a percent character ("%") will
be resolved as an environmental variable. If an literal percent sign is required it can be prefixed with an
additional percentage sign. This is particularly important when passing values that may be required by
instructions that use strftime(3) to format date values, such as SetVar2Date as environmental variables
are resolved prior to any argument values being passed to the respective instruction.

1.2. Syntactical Rules


Definition files are made up of instructions, instruction arguments and comments.
The TapeTrack Definition File parser expects the following syntax rules to be followed:
1. A comment line is any line that starts with a hash ("#") character.
2. Records containing white space will be ignored.
3. Instructions are not case sensitive and can be upper case, lower case or mixed case.
4. Arguments are passed in brackets.
5. All instructions have a fixed number of arguments.
6. Arguments are delimited by a comma (",").
7. The parameters of each instruction can span multiple lines.
8. An instruction is terminated with a semi-colon (";").
9. Even if an instruction has no arguments the brackets and the terminator must be coded.
10.Any text following a semi-colon terminator will be interpretted as a comment as long as it is on the
same line.
11.Arguments containing commas should be enclosed in quotation marks.
12.Definition files can be ASCII text or UNICODE. If they are UNICODE they will be read and interpretted
as ASCII text.
13.Text prefixed with a percentage sign ("%") will be resolved as an environmental variable.
14.Literal percentage sign values should be escaped with an additional percentage sign.
15.Tex prefixed with a dollar sign ("$") will be resolved as local variables.
16.Variable names can container alpha-numeric values of any case and an underscore ("_") or dash ("-");

26

17.Variables are delimited by any non-variable value.


18.Variable delimiters are chomped. If you wish to use a delimiter, such as a period (".") you should add
a second delimiter.

1.2.1. Syntax examples


Example A.1. Definition File syntax examples
#
# Example Comment.
#
Instruction1(argument 1, "argument 2, with comma");
Instruction2();
Instruction1(argument1,
argument2);

# Comment

Instruction1("%USER", "argument2");
Insturction2("%USER..txt", "argument2);
Insturction3("%%H:%%M:%%S);
Comment (ignored).
White space (ignored).
2nd argument has comma (requires quotes).
Instruction with no arguments (requires brackets and semi-colon).
Insturction split between lines.
Comment after semi-colon.
1st argument resolves environmental variable.
Use double periods as first will be chomped.
Escape literal percentage signs with an additional percentage sign.

1.3. Definition File Language Instructions


ConditionalEmbed
conditionalembed

ConditionalEmbed
Conditionally embed a file containing additional definition language elements.

Phase
This instruction is used by the TapeTrack INI Engine.

Syntax
ConditionalEmbed (filepath, filter, value);
string filepath;
string filter;

27

string value;
filepath

The full or relative path to a file that you wish to embed..

filter

A filter value.

string

A string value to be compared against the filter value.

Examples
Example A.2. ConditionalEmbed: Embed a file if the current day is Monday or
Tuesday.
SetVar2Date(TODAY, "*", "%%A");
ConditionalEmbed("montue_ttidef", "*(Monday|Tuesday)", $TODAY);

Embed
embed

Embed
Embed a file containing additional definition language elements.

Phase
This instruction is used by the TapeTrack INI Engine.

Syntax
Embed (filepath);
string filepath;
filepath

The full or relative path to a file that you wish to embed.

Examples
Example A.3. Embed: Embed file extra_stuff.ttidef.
Embed("extra_stuff.ttidef");

SetVar
setvar

SetVar
Set a local variable to a literal value.

Phase
This instruction is used by the TapeTrack INI Engine.

28

Syntax
SetVar (varname, value);
string varname;
string value;
varname

The name of the local variable to be set.

value

The literal value to assign to the local variable.

Examples
Example A.4. SetVar: Set the variable PATHNAME to C:\tapetrack\stuff.
SetVar(PATHNANE, "C\tapetrack\stuff");
Embed("$PATHNAME.\myfile.ttifef");

SetVar2Date
setvar2date

SetVar2Date
Set a local variable to a date value.

Phase
This instruction is used by the TapeTrack INI Engine.

Syntax
SetVar2Date (varname, date, value);
string varname;
string date;
string value;
varname

The name of the local variable that is to be set.

date

The string representing the date required in one of the following formats:
*[+|-]n

Today's date plus or minus an optional number of days.

*
*-100
*+30
Today.
100 days ago.
30 days into the future.
YYYY-MM-DD

The date in ISO date format.

29

2010-12-31
The 31st of December 2010.
Y|y[+|-]n[+|-]m[+|-]d

The beginning or end of the year, + or - a number of years,


+ or - a number of months, + or - a number of days.

Y-0
y-0
Y-1
Y-1+3+3
Y+10+3+3
The start of the current year.
The end of the current year.
The start of last year.
The 3rd day of the third month of last year.
The 3rd day of the 3rd month of the year 10 years
from now.
M|m[+|-]m[+|-]d

The beginning or end of the month, + or - a number of


months, + or - a number of days.

M-0
m-0
M-1
M-1+3
The start of the current month.
The end of the of the current month.
The start of last month.
The 3rd day of last month.
value

The date value in strfdate(3) format.

Examples
Example A.5. SetVar2Date: Set variable YESTERDAY to yesterday's date.
SetVar2Date(YESTERDAY, "*-1", "%%Y-%%m-%%d");
WriteMsg("Yesterday was %YESTERDAY");

Example A.6. SetVar2Date: Set variable START to the first day of this year and
END to the last.
SetVar2Date(START, "Y-0", "%%Y-%%m-%%d");
SetVar2Date(END, "y-0", "%%Y-%%m-%%d");
WriteMsg("Date range is $START through $END");

30

SetVar2File
setvar2file

SetVar2File
Set a local variable to a filename that matches the defined criteria.

Phase
This instruction is used by the TapeTrack INI Engine.

Syntax
SetVar2File (varname, filter, field, offset);
string varname;
string filter;
string field;
int offset;
varname

The name of the local variable that is to be set.

filter

A filter that matches the file that you want to select.

Field

The field to pre-sort the selected pathnames before selection (NAME, CREATION,
LASTACCESS, LASTWRITE or SIZE).

offset

The offset within the sorted list to select. 1 is the top, 2 is the second from the top, -1 is the
bottom, -2 is 2nd from the bottom.

Examples
Example A.7. SetVar2File: Set variable MYFILE to the smallest text file in C:
\stuff.
SetVar2File(MYFILE, "C:\stuff\*.txt", SIZE, -1);
WriteMsg("The smallest file is $MYFILE");

WriteMsg
writemsg

WriteMsg
Write a message to the STDERR.

Phase
This instruction is used by the TapeTrack INI Engine.

Syntax
WriteMsg (message);

31

string message;
message

The message to be written to the stderr during INI Engine processing.

Examples
Example A.8. WriteMsg: Write a message to the current user.
WriteMsg("Just what do you think you're doing, %USERNAME.?");

2. Import Engine Instructions


2.1. Overview
Import Engine Instructions are passed the the TapeTrack Import Engine. This engine is responsible for
obtaining data from sources such as ODBC or files, and parsing them into defined fields, and then
optionally applying translations, truncations and edits to each respective field.

AddExclusionOnValue
addexclusiononvalue

AddExclusionOnValue
Exclude a record from processing if the record contains a value.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddExclusionOnValue (field, filter, value);
string field;
string filter;
string value;
field

The field for this instruction.

filter

The filter value to test with.

value

The value to test against.

Examples
Example A.9. AddExclusionOnValue: Do not process a record if the VOLUME field
starts with CLN

32

AddExclusionOnValue(VOLUME, "CLN*");

AddString
addstring

AddString
Add a special string such as an exclusion or header string.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddString (type, offset, filter);
string type;
integer offset;
string filter;
type

The special string type of one of the following:


1. HEADER A string that represents the first record of a heading section.
2. EXCLUSION A string that represents the a record that should be excluded from all further
processing (skipped).
3. START A string that represents when processing should start. If there is no start string
specified processing will start at the first record.
4. END A string that represents when processing should temporarily stop. Processing will
recommence at the next START record.
5. TERMINATE A string that represents when processing should permanently stop. No
processing will be done past this point, even if a START record is encountered.

offset

The zero based offset within the record at which the filter should be applied.

filter

A filter value for comparison with the processed string.

Examples
Example A.10. AddString: Define a header (ANSI page break) with 7 records, skip
records not starting with an integer and terminate processing at the first blank
record
AddString(HEADER, 0, "1*");
SetHeaderCount(7);
AddString(EXCLUSION, 0, "!([0-9]*");
33

AddString(TERMINATE, 0, "

*");

AddTranslation
addtranslation

AddTranslation
Translate the value of a field based upon the current value of the field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddTranslation (field, filter, translation);
string field;
string filter;
string translation;

Notes
Note
All AddTranslation instructions add to the translation table which is processed in the
sequence in which the AddTranslations are coded in the definition file. Once a translation
match is found for the target field no further translations will occur for that field within that
record.

Note
Although an AddTranslation2 is functionally equivalent to a AddTranslation with the same
field and field2 values, AddTranslation entries are processed first, and then AddTranslation2
entries are processed a 2nd time. This allows you to translate the value of the field2
comparison field first, and then translate the value of the field based upon the translated value
of field2.

Note
To substitute the current field into the string use an asterisk ("*").
To substitute part of the current field into the string use a combination of tildes ("~") and
grave accents ("`"), where a tilde represents a character to include, and a carrat represents
a field to drop.
field

The field to be translated.

filter

A filter to compare against the current field value.

translation

The new value of the field. This can either be a new literal value, or the original value
with a prefix or suffix.

34

Examples
Example A.11. AddTranslation: Append L3 to each VOLUME field if the value
starts with a zero.
AddTranslation(VOLUME, "0*", "*L3");

Example A.12. AddTranslation: Truncate a VOLUME field to 6 characters when


the Volume-ID starts with an A.
AddTranslation(VOLUME, "A*", "*~~~~~~");

AddTranslation2
addtranslation2

AddTranslation2
Translate the value of a field based upon the value of another field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddTranslation2 (field, field2, filter, translation);
string
string
string
string

field;
field2;
filter;
translation;

Notes
All AddTranslation instructions add to the translation table which is processed in the sequence in which
the AddTranslations are coded in the definition file. Once a translation match is found for the target field
no further translations will occur for that field within that record.
Although an AddTranslation2 is functionally equivalent to a AddTranslation with the same field and field2
values, AddTranslation entries are processed first, and then AddTranslation2 entries are processed a 2nd
time. This allows you to translate the value of the field2 comparison field first, and then translate the value
of the field based upon the translated value of field2.
field

The field to be translated.

field2

The field to be compared using the filter.

filter

A filter to compare against the current field value.

translation

The new value of the field. This can either be a new literal value, or the original value
with a prefix or suffix. To represent the current value use an asterisk ("*").

35

Examples
Example A.13. AddTranslation2: Append L3 to each VOLUME field value of
USER1 is HCART3.
AddTranslation2(VOLUME, USER1, "HCART3", "*L3");

AddTranslation2FromFile
addtranslation2fromfile

AddTranslation2FromFile
Translate the value of a field based upon the value of another field, where the other field value can be
loaded multiple times using the contents of a file.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddTranslation2FromFile (field, field2, filterfile, translation);
string
string
string
string

field;
field2;
filterfile;
translation;

field

The field to be translated.

field2

The field to be compared.

filterfile

A file containing filter values to compare against the current field value.

translation

The new value of the field. This can either be a new literal value, or the original value
with a prefix or suffix. To represent the current value use an asterisk ("*").

Notes
See the notes section for AddTranslation2.

Examples
Example A.14. AddTranslation2FromFile: Append L3 to each VOLUME field
if the value of the MEDIA mathces a pattern within a record of c:\data
\LTO3Volumes.txt.
AddTranslation2FromFile(VOLUME, MEDIA, "c:\data\LTO3Volumes.txt", "*L3");

36

AddTranslationFromFile
addtranslationfromfile

AddTranslationFromFile
Translate the value of a field based upon the current value of the field, where the current value can be
loaded multiple times using the contents of a file.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
AddTranslationFromFile (field, filterfile, translation);
string field;
string filterfile;
string translation;
field

The field to be translated.

filterfile

A file containing filter values to compare against the current field value.

translation

The new value of the field. This can either be a new literal value, or the original value
with a prefix or suffix.

Notes
See the notes section for AddTranslation.

Examples
Example A.15. AddTranslation2FromFile: Append L3 to each VOLUME field if
the value matches a pattern within a record of c:\data\LTO3Volumes.txt.
AddTranslationFromFile(VOLUME, "c:\data\LTO3Volumes.txt", "*L3");

ChangeCase
changecase

ChangeCase
Change the case of a field.

Phase
This instruction is used by the TapeTrack Import Engine.

37

Syntax
ChangeCase (field, type);
string field;
string type;
LOWER, UPPER, CAPITALIZED or INVERTED
field

The field for this instruction.

type

The special string type of one of the following:


1. LOWER The data in the field will be converted to lower case.
2. UPPER The data in the field will be converted to upper case.
3. CAPITALIZED The data in the field will be converted so that the first letter of each word
is capitalized.
4. INVERTED The data in the field will be converted so that any upper case character will be
lower case and vice versa.

Examples
Example A.16. ChangeCase: Capitalize the value of the DESCRIPTION field.
ChangeCase(DESCRIPTION, CAPITALIZE);

Extract
extract

Extract
Extract a field from a record, CSV element or SQL field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
Extract (field, offset, length, record);
string field;
integer offset;
integer length;
integer record;
field

The field to be set by this extraction.

offset

The zero based offset of the data to be extract, or the element index of a CSV element or SQL
element. In the event that the data being processed is CSV based, a value of zero indicates that
the raw CSV string should be extracted rather than an individual CSV element.

38

length

The length of the data to be extracted if the data is text based, or the maximum data length
for CSV or SQL data.

record

The record within a header, if the value is non-zero and the data is text based. A record that is
not a header if the value is zero and the data is text based. For CSV and SQL data this argument
is ignored.

Examples
Example A.17. Extract: Extract VOLUME field from offset 10, length 6 of the body
of a report.
Extract(VOLUME, 10, 6, 0);

Example A.18. Extract: Extract VOLUME field from the 2nd element of a CSV file.
SetCSVDelimiter(",");
Extract(VOLUME, 2, 6, 0);

Example A.19. Extract: Extract REPOSITORY field from offset 70, length 4 of the
3rd record of a header.
Extract(REPOSITORY, 70, 4, 3);

RemoveSpaces
removespaces

RemoveSpaces
Remove leading and trailing spaces (white space) from a field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
RemoveSpaces (field);
string field;
field

Field to have white space removed.

Examples
Example A.20. RemoveSpaces: Remove leading and trailing spaces from
REPOSITORY field.
RemoveSpaces(REPOSITORY);

39

SetCSVDelimiter
setcsvdelimiter

SetCSVDelimiter
Set the delimiter to be used in CSV processing and instruct the engine to process each record as CSV.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetCSVDelimiter (delimiter);
character delimiter;
delimiter

The delimiter to be used when parsing a CSV file. This is usually a comma (",").

Examples
Example A.21. SetCSVDelimiter: Parse a CSV file using a comma as the delimiter.
SetCSVDelimiter(",");

SetFile
setfile

SetFile
Set the path to the source text file.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetFile (filepath);
string filepath;
filepath

Path to the file that will be processed. If no SetFile and no SetODBC specified engine
will default to stdin.

Examples
Example A.22. SetFile: Set the input file to c:\data\tapetrack\controlt.txt.

40

SetFile("c:\data\tapetrack\control-t.txt");

SetHeaderCount
setheadercount

SetHeaderCount
Set the number of records after an initial header record that should be considered part of the header section
of an input file.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetHeaderCount (count);
integer count;
count

Number of records in a header (including the initial header record) as identified by AddString
with HEADER argument.

Examples
Example A.23. SetHeaderCount: Define a header (ANSI page break) with 7 records,
skip records not starting with an integer and terminate processing at the first blank
record.
AddString(HEADER, 0, "1*");
SetHeaderCount(7);
AddString(EXCLUSION, 0, "!([0-9]*");
AddString(TERMINATE, 0, "

SetLiteral
setliteral

SetLiteral
Set a field to a literal value.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetLiteral (field, value);
string field;

41

*");

string value;
field

The field name to set.

value

The field value to be set.

Examples
Example A.24. SetLiteral: Set field REPOSITORY to literal ACME.
SetLiteral(REPOSITORY, "ACME");

SetNoBodyRecords
setnobodyrecords

SetNoBodyRecords
Instruct the engine to process the last record of a heading as a standard record.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetNoBodyRecords

Examples
Example A.25. SetNoBodyRecords: Process the last record of a header as a body
record.
SetNoBodyRecords();

SetODBC
setodbc

SetODBC
Set the ODBC connection string and instruct the Import Engine to use ODBC mode.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetODBC (odbc);

42

string odbc;
odbc

The ODBC connection string.

Examples
Example A.26. SetODBC: Select the Microsoft Access Driver and pass the Access
file to use.
SetODBC("Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Data\Sync\Tapes.mdb");
SetSQL("SELECT Barcode,Location FROM [Inventory]");

Example A.27. SetODBC: Select the Microsoft Excel Driver and pass the Excel file
to use.
SetODBC("Driver={Microsoft Excel Driver (*.xls)};Dbq=C:\Data\Sync\Tapes.xls");
SetSQL("SELECT Barcode,Location FROM [Inventory$]");

SetPostScript
setpostscript

SetPostScript
Set a script to be run at the end of source processing.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetPreScript (command);
string command;
command

The full path to a script or executable to be run with the system(3) call at the end of Import
Engine processing.

Examples
Example A.28. SetPostScript: Rename a file with a time stamp after the file is
processed.
SetVar2Date(FILENAME, "*", "vmquery-%%Y-%%m-%%d");
SetPostScript("rename vmquery.txt $FILENAME");

SetRemoveCharacters
setremovechars

43

SetRemoveCharacters
Remove unwanted characters from a field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetRemoveCharacters (field, characters);
string field;
string characters;
field

Field to have characters removed.

characters

A string listing all of the characters that should be removed for a field.

Examples
Example A.29. SetRemoveChars: Remove dashes and commas from a field.
SetRemoveChars("-,");

SetSQL
setsql

SetSQL
Set the SQL string that will be used to query the SQL data source.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetSQL (sql);
string sql;
sql

The SQL string that will be used to query the SQL data source.

Examples
Example A.30. SetSQL: Select all fields from table volumes

44

SetSQL("SELECT * FROM [volumes]");

Example A.31. SetSQL: Select the Barcode and Location fields from Excel
Spreadsheet workbook Inventory.
SetSQL("SELECT Barcode,Location FROM [Inventory$]");

SetTruncationChars
settruncationchars

SetTruncationChars
Set characters that should be used to determine when to truncate a field.

Phase
This instruction is used by the TapeTrack Import Engine.

Syntax
SetTruncationChars (field, chars);
string field;
string chars;
field

The field for this instruction.

chars

A string containing a list of characters which should be used for truncation.

Examples
Example A.32. SetTruncationChars: Truncate the field VOLUME at any character
- or [
SetTruncationChars(VOLUME, "-[");

A.2. Management Commands


A.2.1. TMSS10MoveScratch
TMSS10MoveScratch
TMSS10MoveScratch this program can be used to set the Scratch Flag, move Scratch Volumes to a
new Repository and produce a Scratch Report.

Synopsis
45

TMSS10MoveScratch [-a] [-b] [-R] [-S logonstring] [-V volumefilter] [-c configfile]

Description
TMSS10MoveScratch is used to manage Scratch Volumes, it performs 3 functions:
1. Moves all Volumes with a Scratch Flag to the Repository specified in the -R argument.
2. Sets the Scratch Flag for all Volumes.
3. Lists all Volumes with a Scratch Flag.
This command is particularly helpful for platforms such as Tivoli Storage Manager which deletes scratch
tapes from its Volume Table, as you can schedule the command to run once per week to reset all Volumes
to Scratch, then remove the Scratch Flag using TMSS10Sync(1) during the week. Then when the program
is run subsequently the next week, it will move each Volume that still has the Scratch Flag set to a new
Repository.

Special Note
Please note that when running TMSS10MoveScratch with the -R argument set you must be
sure that the process that sets the Scratch Flag to false has run. In the event that this is multiple
processes (where you have multiple backup catalogs) you must be sure that all processes
would have run. In the event that not all Scratch Flags that should have been removed have
not been removed it is possible that non-Scratch tapes will be moved.
To run the command to only product a Scratch Report, specify the -b argument and do not specify the R argument.

Options
The options which apply to the TMSS10MoveScratch command are:
-a

This argument disables the first step of the command which moves all
Scratch Volumes to a new Repository.

-b

This argument disables the second step of the command which sets the
Scratch Flag for all Volumes.

-R

This argument sets the Repository where Scratch Volumes are to be moved.

-R

This argument sets the Repository where Scratch Volumes are to be moved.

-S

The logonstring argument sets the Server logon informaton in the


format user:password@server:port.
In the event that this argument is not passed the default will be
batch:batch@localhost:5000.
By default the password value will be treated as the path to a file which
contains a single record representing the password, rather than the password
itself.
If you wish the password value to be the literal password (rather
than a file) the password should be prepended with a dash (fred:fredspassword@server).

46

You can also have the program read the password as the first record of stdin
by prepending the password with a plus symbol (fred:+@server).
In the event that the password is all upper case and 32 characthers in length,
the password will be considered an MD5 hash of the password and passed
to the server without subsequent MD5 hashing.
The volumefilter argument sets the Volume Filter which can be used
to filter the traversal of Customer, Media and Volume values.

-V

The format of this filter is c.m.v@r, where c is Customer-ID filter, m is


Media-ID filter, v is Volume-ID filter and r is Repository-ID filter.
To process only volumes not in Repository ACME, "*.*.*@!(ACME).
The configfile argument specifies the path to the Batch Configuration File.

-c

The Batch Configuration File allows you to perform advanced traversal


of Customer, Media and Volumes, perform advanced barcode pre and
post processing and route program output to syslogd. Configuration File
capabilities vary from program to program but the syntax remains the same.
In the event that logic is not supported it will simply be ignored.
The following example will set the default Customer-ID and Media-ID for
all scanned barcodes:
barcodes =
{
defaults={ customer-id="ACME"; media-id="LTO"; };
};

Exit Status
zero

Program has ended successfully.

non-zero

Program has not ended successfully.

Environment
TMSSSERVERPROXY

If defined the program will route all TapeTrack TCP/IP traffic through
a HTTPS proxy. The value of the variable should be in the format
user:password@host:port. To debug the proxy connection use variable
TMSSAPILOGDIR.

TMSSAPILOGDIR

If defined the program will write out a trace file to this directory.

TMSSPWPATH

When no password value is passed in the logon string the program will look for
the password in file \etc\tapetrack\user, where user is the user value
passed in the logonstring. If you wish to change this default path, you can
set the path in TMSSPWPATH.

Examples
Example A.33. TMSS10MoveScratch: Produce a Scratch Report.

47

C:\> TMSS10MoveScratch -b -S tapemaster:+@localhost > scratch_report.txt


System: TapeTrack
Report Description: Scratch List
Production Time: Monday, August 25, 2014 - 10:10:19 (Mountain Daylight Time)
Report Width: 152 bytes
Seq.
-----1
2
3
4
5

Barcode
-------------------AHKG.LTO.302669401
AHKG.LTO.302669402
AHKG.LTO.302669403
AHKG.LTO.302669404
AHKG.LTO.302669405

Current Target
-------------------Initial Repository
Initial Repository
Initial Repository
Initial Repository
Initial Repository

New Target
-------------------N/A
N/A
N/A
N/A
N/A

Message
--------------------No change requested
No change requested
No change requested
No change requested
No change requested

Files
stdout

Output Reports.

stderr

Diagnostic messages.

stdin

Program input.

See Also
TMSS10Sync(1)

Bugs
On the Linux platform all TapeTrack command line programs are compiled with static C runtimes. This
means that on some older Linux versions DNS name resolution does not work and you must use dotted
IP addresses.

Reporting Bugs
Please report any bug by emailing <support@gazillabyte.com> or by visiting http://
support.gazillabyte.com.

Copyright
Copyright GazillaByte 1999-2014.

Changes
A list of changes to this module can be viewed in RSS format at http://www.tapetrack.com/cgi/
changelog.cgi?Module=TMSS10MoveScratch.

A.2.2. TMSS10Sync
TMSS10Sync
TMSS10Sync synchronize an input file or ODBC connection data with a TapeTrack Framework
Server.

Synopsis
TMSS10Sync [-A attributeindex] [-F recordcount] [-M] [-S logonstring] [-T] [-a] [-c
configfile] [-d deffile] [-l] [-p] [-s] [-t]

48

Description
TMSS10Sync is a command line utility that allows the user to run adhoc and automated synchronization
between text files, CSV files and ODBC connections to update commonly used TapeTrack database fields.
In addition to being able to synchronize data, the program can also perform complex date calculation and
string manipulation procedures to edit the data that is being synchronized.
The program relies on three separate software engines that are built one on top of the other.
INI Parse Engine

This component is responsible for reading the Definition File, parsing


the processing directives, resolving variables and including any embedded
Definition File sections.

Import Engine

This component is responsible for reading data from the import file or ODBC
connection, extracting data into respective fields and performing any data
manipulation.

Sync Engine

This component responsible for updating the TapeTrack Server with any fields
which have been specified to be updated.

Options
The options which apply to the TMSS10Sync command are:
-S

The logonstring argument


user:password@server:port.

sets

the

Server

logon

informaton

in

the

format

In the event that this argument is not passed the default will be batch:batch@localhost:5000.
By default the password value will be treated as the path to a file which contains a single record
representing the password, rather than the password itself.
If you wish the password value to be the literal password (rather than a file) the password should be
prepended with a dash (fred:-fredspassword@server).
You can also have the program read the password as the first record of stdin by prepending the
password with a plus symbol (fred:+@server).
In the event that the password is all upper case and 32 characthers in length, the password will be
considered an MD5 hash of the password and passed to the server without subsequent MD5 hashing.
-c

The configfile argument specifies the path to the Batch Configuration File.
The Batch Configuration File allows you to perform advanced traversal of Customer, Media and
Volumes, perform advanced barcode pre and post processing and route program output to syslogd.
Configuration File capabilities vary from program to program but the syntax remains the same. In
the event that logic is not supported it will simply be ignored.
The following example will set the default Customer-ID and Media-ID for all scanned barcodes:

barcodes =
{
defaults={ customer-id="ACME"; media-id="LTO"; };
};
49

-A

This argument sets the attribute index for any field imported as the DESCRIPTION field. The value
of attributeindex should be an integer between 0 and 200. The default of 200 represents the
inbuilt Description field. Values of 1 through 200 represent user-defined Extended Attribute values.

-F

This argument instructs the program to simply read in the contents of STDIN and write out a
formatted report on STDOUT with a ruler every recordcount records. This can be helpful for
establishing the offset and length of the fields that are being synchronized from a text file. No other
processing will be preformed.

-M

This argument instructs the program to run in Dump Mode. Dump mode processes the input
synchronization as it would in the regular update mode but instead of performing any updates the
program will write a list of proposed update fields for each record to the STDIN.

Special Note
When running in Dump Mode the program will only run the INI Parse Engine and the
Import Engine. It will not run the Sync Engine. As a result, any functionality that relies
on the Sync Engine, such as the Barcode Parse Option will not be invoked. Further,
functions that relate to data interpretation such as date parsing will also not be run.
-T

This argument instructs the program to set the Do Not Slot flag for each updated Volume.

-a

This argument instructs the program to add any new Volumes to the TapeTrack database. In the event
that this argument is not specified and newly encountered Volumes will be skipped and added to
the Not-Added Count.

-d

This argument sets the path to the Import Definition File. The Import Definition file is responsible
for instructing the program on how to interpret the input file or ODBC connection. This argument is
required and defaults to the file default.ttidef.

-l

This argument instructs the program to list all of the supported processing directives, which will be
written to STDOUT. A list of valid ODBC Drivers and DSNs will also be listed. No further processing
is performed.

-p

This argument instructs to Sync Engine to pass the value in the the VOLUME field to TapeTrack's
Barcode Parsing Engine, where it will be split into the CUSTOMER, MEDIA and VOLUME fields.
Barcode Parsing can also be further managed using the barcode section of the Configuration File.

-s

This argument instructs the program to automatically set the SLOT field to the relative record number
of the record being processed.

-t

This argument instructs the program to run in Test Mode. In Test Mode all three engines will be
invoked, but no updates will be performed. Test Mode differs from Dump Mode in that Dump Mode
will not run the Sync Engine while Test Mode will, but without performing updates.

Exit Status
zero

Program has ended successfully.

non-zero

Program has not ended successfully.

Environment
TMSSSERVERPROXY

If defined the program will route all TapeTrack TCP/IP traffic through
a HTTPS proxy. The value of the variable should be in the format

50

user:password@host:port. To debug the proxy connection use variable


TMSSAPILOGDIR.
TMSSAPILOGDIR

If defined the program will write out a trace file to this directory.

TMSSPWPATH

When no password value is passed in the logon string the program will look for
the password in file \etc\tapetrack\user, where user is the user value
passed in the logonstring. If you wish to change this default path, you can
set the path in TMSSPWPATH.

Examples
Example A.34. TMSS10Sync: List supported Processing Directives.
[gnicol@z1090 ~]$ TMSS10Sync -l < syntax.txt

Example A.35. TMSS10Sync: Run program in Dump Mode.


[gnicol@z1090 ~]$ TMSS10Sync -M < input.txt

Example A.36. TMSS10Sync: Produce a formatted listing with a ruler every 10


records.
[gnicol@z1090 ~]$ TMSS10Sync -F 10 < input.txt > output.txt

Files
stdout

Formatted output, Record Dump output or Scan File Output.

stderr

Diagnostic messages.

stdin

Sync input file.

See Also
TMSS10MoveScratch(1), TMSS10SingleSpace(1), TMSS10CSV2Fixed(1), TMSS10DRP_TSM(1),
TMSS10DRP_BRMS(1)

Bugs
On the Linux platform all TapeTrack command line programs are compiled with static C runtimes. This
means that on some older Linux versions DNS name resolution does not work and you must use dotted
IP addresses.

Reporting Bugs
Please report any bug by emailing <support@gazillabyte.com> or by visiting http://
support.gazillabyte.com.

Copyright
Copyright GazillaByte 1999-2014.

51

Changes
A list of changes to this module can be viewed in RSS format at http://www.tapetrack.com/cgi/
changelog.cgi?Module=TMSS10Sync.

A.3. Diagnostic Commands


A.3.1. TMSS10Ping
TMSS10Ping
TMSS10Ping test the connection with a TapeTrack Framework Server.

Synopsis
TMSS10Ping [-n count] [-P port] [-?] [-v] host

Description
TMSS10Ping sends dummy packets to a TapeTrack Framework Server and receives a reply packet. It
should be noted that unlike the ping(1) command, TMSS10Ping(1) sends payload packets via the TCP/
IP protocol.

Options
The options which apply to the TMSS10Ping command are:
-n

This option sets the number of test packets to send to an integer other than 4.

-P

This option sets the TCP/IP port to an integer other than 5000.

host

Host name or dotted IP address of TapeTrack Framework Server.

Exit Status
zero

Program has ended successfully.

non-zero

Program was unable to connect to the TapeTrack Framework Server.

Environment
TMSSSERVERPROXY

If defined the program will route all TapeTrack TCP/IP traffic through
a HTTPS proxy. The value of the variable should be in the format
user:password@host:port. To debug the proxy connection use variable
TMSSAPILOGDIR.

TMSSAPILOGDIR

If defined the program will write out a trace file to this directory.

Examples
This example tests a TapeTrack connection on port 443.

C:\>TMSS10Ping -P 443 tapetrack.ironmountain.com

52

44
44
44
44

bytes
bytes
bytes
bytes

from
from
from
from

216.229.153.104:
216.229.153.104:
216.229.153.104:
216.229.153.104:

seq=1
seq=2
seq=3
seq=4

time=58.00
time=58.00
time=58.00
time=57.00

ms
ms
ms
ms

--- tapetrack.ironmountain.com TMSS10Ping statistics --4 packets transmitted


round-trip min/avg/max = 0.00/57.75/58.00 ms
This example sends an email if a TapeTrack Server is down.

#!/bin/bash
TMSS10Ping -P 443 tapetrack.ironmountain.com > /dev/null
[ $? -ne 0 ]; then
sendmail .....
fi

Example A.37. TMSS10Ping: send pings request via a proxy server, creates a trace
file and displays the trace file.
set PROXYIP=192.168.1.10
set PROXYPORT=3128
set PROXYUSER=
set PROXYPW=
set TAPETRACKIP=server.databank.co.il
set TAPETRACKPORT=443
set TMSSAPILOGDIR=%TEMP%
set TMSSSERVERPROXY=%PROXYUSER%:-%PROXYPW%@%PROXYIP%:%PROXYPORT%
del /Q "%TMSSAPILOGDIR%\TMSSAPILOG-*.txt"
TMSS10Ping -P %TAPETRACKPORT% %TAPETRACKIP%
type "%TMSSAPILOGDIR%\TMSSAPILOG-*.txt"
pause
Set variable for HTTP Proxy Server address.
Set TCP/IP port of HTTP Proxy Server.
Set variable for HTTP Proxy Server User-ID (if any).
Set variable for HTTP Proxy Server password (if any).
Set variable for HTTP Proxy Server address.
Set variable for TapeTrack Server address.
Set variable for TapeTrack Server port.
Set variable for output directory to Windows temp folder.
Set variable that tells TMSS10Ping to go via a proxy.
Run TMSS10Ping command.
List the results.

Files
stdout

Program messages indicating statistics from ping.

See Also
TMSS10(1)

53

Bugs
On the Linux platform all TapeTrack command line programs are compiled with static C runtimes. This
means that on some older Linux versions DNS name resolution does not work and you must use dotted
IP addresses.

Reporting Bugs
Please report any bug by emailing <support@gazillabyte.com> or by visiting http://
support.gazillabyte.com.

Copyright
Copyright GazillaByte 1999-2014.

Changes
A list of changes to this module can be viewed in RSS format at http://www.tapetrack.com/cgi/
changelog.cgi?Module=TMSS10Ping.

54

Index
C
CA-1, 23

E
EARL, 23

G
Generalized Report Writer
GRW, 23

T
Tivoli Storage Manager
TSM, 20

55

Colophon
This book was produced using DocBook XML on Fedora Linux 20. The version control system used during production
was git(1).
Document built 2014-12-21 16:50:30.

56

Potrebbero piacerti anche