I'm unable to get the syntax of the following command working. I need Perl to interpret the command as follows as I know it works:
dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd "select volume_name,access from volumes where volume_name='VOLUME_1'"
i.e.the application needs the single tic marks around "VOLUME_1", but when I pass the command into Perl as below, it does not interpret as expected and I get the syntax error from the TSM. Any ideas?
#!/usr/bin/perl
$id=tsmhsk;
$pass=tsmhsk;
$tsmsrv_cmd0="select volume_name,access from volumes where volume_name='VOLUME_1'";
foreach my $arg (@ARGV) { # Capturing command line Variables
$instance=$ARGV[0]; # This will be the TCPSERVERADDRESS
$node_namee=$ARGV[1]; # This will be the TCPPORT
}
open(LOGIN3, "dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd $tsmsrv_cmd0|") || die "open: $!";
@get_restore_vol_list=<LOGIN3>;
close(LOGIN3);
print "@get_restore_vol_list\n";
dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd "select volume_name,access from volumes where volume_name='VOLUME_1'"
i.e.the application needs the single tic marks around "VOLUME_1", but when I pass the command into Perl as below, it does not interpret as expected and I get the syntax error from the TSM. Any ideas?
#!/usr/bin/perl
$id=tsmhsk;
$pass=tsmhsk;
$tsmsrv_cmd0="select volume_name,access from volumes where volume_name='VOLUME_1'";
foreach my $arg (@ARGV) { # Capturing command line Variables
$instance=$ARGV[0]; # This will be the TCPSERVERADDRESS
$node_namee=$ARGV[1]; # This will be the TCPPORT
}
open(LOGIN3, "dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd $tsmsrv_cmd0|") || die "open: $!";
@get_restore_vol_list=<LOGIN3>;
close(LOGIN3);
print "@get_restore_vol_list\n";