$dbh->do ("export to table_foo of del select id, str from table_foo"); DBD::DB2::db do failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "export to table_foo of del select id," was found following "BEGIN-OF-STATEMENT". Expected tokens may include: "". SQLSTATE=42601 #### use strict; use DB2::Admin; # use 'perl -s' our $INST; our $USER; our $PASS; our $TABL; our $SCHM; DB2::Admin::->SetOptions('RaiseError' => 1); DB2::Admin::->Connect( 'Database' => $INST, 'Userid' => $USER, 'Password' => $PASS ); DB2::Admin->Export( 'Database' => $INST, 'Schema' => $SCHM, 'Table' => $TABL, 'OutputFile' => "/tmp/data-$SCHM-$TABL.del", 'FileType' => 'DEL' ); __END__ #### $ perl -ws admin.pl -INST=TEST -USER=db2inst1 -PASS=***** -SCHM=db2inst1 -TABL=table_foo $ cat /tmp/data-db2inst1-table_foo.del 1,"foo" 2,"bar" 3,"tze"