in reply to How to load a DB2 database using PERL

LOAD cannot executed via CLI because it's a "Command Line Processor Command". See http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/core/r0010410.htm for a list. These commands are resolved by the command line processor ("db2" or "db2.exe"), not the database engine. You may get some of the functionality on C level, but not with CLI SQL.

Do a system() instead.

system('db2', 'LOAD from ...'); if ($? == 0) { # all ok } if ($? & 1) { # oops, we didn't select at all? } if ($? & 2) { # just a warning } if ($? & 4) { # execution failed } if ($? & 8) { # command line processor failed } if ($? & ! 15) { # what? }

Search, Ask, Know