#!/usr/local/bin/perl
# Dispaly the long raw fields of such tables
# as d010s (abap sources) ...
# Run the script like this:
# perl q.pl BLOCK D010S PROG SHOWCOLO
#             |    |     |      |
#             |    |     | key field value
#             |    | key field
#             |  table 
#     log raw field name
use Oraperl;
$lda = ora_login("SID","sapr3","sap") || die "Cannot logon\n";
$query = "select $ARGV[0] from $ARGV[1] where $ARGV[2] = '$ARGV[3]'";
$csr = &ora_open($lda,$query);
@value = ora_fetch ($csr);
open (FILE, ">zizi");
$offset = 0;
while (1)
{
$blob = $csr->blob_read (0, $offset, 10000);
last unless $blob;
last unless length ($blob);
print FILE $blob;
$offset += length ($blob);
}
&ora_close($csr);
&ora_logoff($lda);