use strict; use strict; use DBI; my $dbh = DBI->connect("dbi:DB2:$dbname",'','',{PrintError => 0}); my $sth = $dbh->prepare("call sp.tbspace"); $sth->execute; do{ while (my $row = $sth->fetchrow_arrayref()) { my $lineStr = @$row; push @dcpu_all_array, "$lineStr\n"; } }while ($sth->{db2_more_results}); $sth->finish;