NAME
DBD::TSM - Perl DBD driver for TSM admin client
SYNOPSIS
use DBI;
my ($server_name,$user,$password)=(...); #or set DBI_DSN,DBI_USER,DBI_PASS
my $dbh=DBI->connect("DBB:TSM:$server_name",$user,$password,
{RaiseError => 0,
PrintError => 0}) or die $DBI::errstr;
#If you use environment variable $dbh=DBI->connect();
my $sth=$dbh->prepare("select node_name from nodes") or
die $dbh->errstr;
$sth->execute() or die $sth->errstr();
print "@{$sth->{NAME}}\n";
$sth->dump_results();
DESCRIPTION
DBD::TSM is a DBI Driver to interface DBI with dsmadmc. You could use all the command possible with dsmadmc with the Power of DBI. I don't test all the DBI capabilities.
To work you need to have:
A TSM server started
A TSM Client full operationnal. i.e.:
TSM Binary installed (dsmadmc is the much important for me)
dsm.sys or/and dsm.opt set to work with your tsm server.
Check it before with a manual test with:
dsmc query session command
Check it before with a manual test with:
dsmadmc -id=<user> -pa=<password> -se=<Your Server Name stanza> query status
AutoCommit
When you set AutoCommit (the default), I add -itemcommit in command line.
Advice
I always set PrintError => 0 and RaiseError => 0. Because, TSM send a '11' return code for empty statement and DBI exit automatically with rc > 0.
I prefer to check return code with function err and messages with errmsg. I do a filter on AN.....[^I] to print error messages.
EXPORT
None by default.
SEE ALSO
DBI(3).
TSM Client Reference Manual.
BUGS
I'm not using TSM API. So, I do one session for each statement. I'm not a C developper, sor it's a Pure Perl Module.
AUTHOR
Laurent Bendavid, <bendavid.laurent@free.fr>
COPYRIGHT AND LICENSE
Copyright (C) 2005 by Laurent Bendavid
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.