TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:tmss10page2csv
 
 

TMSS10Page2CSV

TMSS10Page2CSV converts a page formatted report to a CSV file.

Synopsis

This program expects a variable number of arguments. Each argument is a string representing a filter, the first filter represents the string that should be considered a page break, while each subsequent argument represents a string that should be considered a record to be extracted.

Options

This program has no options.

Exit Status

  • zero Program has ended successfully.
  • non-zero Program has not ended successfully.

Environment

TMSSBEEP If defined the program will beep whenever an error occurs.

TMSSCHOMP If defined the program will remove the number of characters defined from the beginning of the extracted string.

Files

stdout: Output Reports.
stderr: Diagnostic messages.
stdin: Program input.

Example

Command Line Syntax

Define TMSSCHOMP to remove the first 32 bytes from extracted string
Set first argument (*=*“) to define page break, any string starting with character =
Extraction filter (“Media Status:*”) for field 1
Extraction filter (“Data Expiration:*”) for field 2
Direct input file media.txt to stdin

set TMSS10CHOMP=32
TMSS10Page2CSV "===*" "Barcode:*" "Volume Pool:*" "Vault Name:*" "Robot Number:*" "Media Status:*" "Last Written:*" "Last Read:*" "Data Expiration:*" < media.txt > media.csv

Sample Input File

Media.txt

Media GUID:                     afds5a1b-fb65-4bfb-4f38-07f7ds418074
Media ID:                       101001                              
Media Type:                     HCART                               
Volume Group:                   Off_Site                            
Description:                    Scratch                             
Barcode:                        101001L5                            
Created:                        06/24/2018 16:11                    
Last Mount:                     05/09/2020 15:23                    
Volume Expiration:              -                                   
Data Expiration:                -                                   
Last Written:                   06/01/2021 14:44                    
Last Read:                      -                                   
Robot Type:                     NONE                                
Robot Control Host:             -                                   
Robot Number:                   -                                   
Number of Mounts:               116                                 
Media Status:                   ACTIVE                              
Retention Period:               -                                   
Last Header Offset:             0                                   
Origin Host:                    NONE                                
Master Host:                    sac100.gazillabyte.com  
Pool Number:                    4                                   
Volume Pool:                    Scratch                             
Previous Pool Name:             GazillaByte-1                   
Vault Name:                     GazillaByte_Vault_Eject              
Date Vaulted:                   06/04/2021 18:05                    
Return Date:                    06/04/2021 18:05                    
====================================================================
Media GUID:                     afds5a1b-fb65-4bfb-4f38-07f7ds418074
Media ID:                       101002                              
Media Type:                     HCART                               
Volume Group:                   Off_Site                            
Description:                    Scratch                             
Barcode:                        101002L5                            
Created:                        06/24/2018 16:11                    
Last Mount:                     05/09/2020 15:23                    
Volume Expiration:              -                                   
Data Expiration:                -                                   
Last Written:                   06/01/2021 14:44                    
Last Read:                      -                                   
Robot Type:                     NONE                                
Robot Control Host:             -                                   
Robot Number:                   -                                   
Number of Mounts:               116                                 
Media Status:                   ACTIVE                              
Retention Period:               -                                   
Last Header Offset:             0                                   
Origin Host:                    NONE                                
Master Host:                    sac100.gazillabyte.com  
Pool Number:                    4                                   
Volume Pool:                    Scratch                             
Previous Pool Name:             GazillaByte-1                   
Vault Name:                     GazillaByte_Vault_Eject              
Date Vaulted:                   06/04/2021 18:05                    
Return Date:                    06/04/2021 18:05                    
====================================================================

Sample Output File

media.csv

101001L5,Scratch,GazillaByte_Vault_Eject,-,ACTIVE,06/01/2021 14:44,-,-,
101002L5,Scratch,GazillaByte_Vault_Eject,-,ACTIVE,06/01/2021 14:44,-,-,
Changelog
2015-12-26Changed typo in output to
2015-12-26Fixed GPF on Solaris when more than one record argument was passed
2015-08-24Changed hascontents to contentcount and change contentcount to a filter rather than bool
2015-08-24Added iscontainer and hascontents to the config file filter logic
2015-06-03Added TMSSUNQUALIFIEDVOLUME environmental variable which forces all barcodes to be printed without Customer-ID and Media-ID
2015-06-03Added environmental varialbe TMSSCANFILEUNQUALIFIED which will load and check volumes without Customer-ID and Media-ID qualifiers
2015-06-03Added environmental varialbe TMSSSCANFILENOPARSE which will presume scanfile items are only Volumes and not parse them, saving time
2015-06-03Added support for AD passwords to all command line programs (check for environmental variable TMSSNOMD5)
2015-06-03When loading scanfile from import definition, added CUSTOMER and MEDIA keywords to set defaults
2015-06-03When loading scanfile from import definition, changed keyword from VOLUME to BARCODE
2015-06-03Changed server argument parser to allow colon in password to support z/OS DD name files
2015-06-03Upgraded development environment from Visual Studio 2012 to Visual Studio 2013
2015-06-01Initial version
cli/tmss10page2csv.txt · Last modified: 2022/05/31 00:06 by scunliffe