Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
I always do this because my production team won't let me use DBI.
my $x=`dbaccess $db <<EOF >/dev/null 2>&1
set isolation to dirty read ;
unload to /tmp/space_$$.out delimiter '|'
select count(*) as nchunks from sysmaster:syschunks;EOF
`;
unless( open COUNT, "/tmp/space_$$.out" ) {
cleanup;
die "Could not open count.\\n" ;
}
while ( <COUNT> ) {
my @row=split /\\|/, $_ ;
process row here
}
#cleanup
unlink "/tmp/space_$$.out"
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.